Discover Centmin Mod today
Register Now

MariaDB MariaDB 10.1.x ALTER command not found

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Feb 16, 2016.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    7:23 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Hi

    I just upgrade to latest MariaDB 10.1.x and i want to convert a table from Myisam to Innodb using:

    Code:
    ALTER TABLE my_table ENGINE = InnoDB;
    but i am getting this:

    Code:
    -bash: ALTER: command not found
    Is this changed in the new version?

    Can't find the correct syntax to convert it to Innodb :(

    Thanks

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    those commands are run from mysql client not ssh client
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    7:23 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Confused ....

    If i am not wrong i always do it that way.Login to ssh and the login to mysql using mysql -u root -p and then run the command......
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    that is correct you're running from mysql client

    but this error means you're running from SSH shell
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    works fine for me
    Code:
     mysql dbtest1
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 39
    Server version: 10.1.11-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [dbtest1]> show tables;
    +-------------------+
    | Tables_in_dbtest1 |
    +-------------------+
    | t1                |
    +-------------------+
    1 row in set (0.00 sec)
    
    Code:
    MariaDB [dbtest1]> ALTER TABLE t1 ENGINE=InnoDB;
    Query OK, 0 rows affected (0.20 sec)
    Records: 0  Duplicates: 0  Warnings: 0
    
    Code:
    MariaDB [dbtest1]> select @@VERSION;
    +-----------------+
    | @@VERSION       |
    +-----------------+
    | 10.1.11-MariaDB |
    +-----------------+
    1 row in set (0.00 sec)
     
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    7:23 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Mysql exited by mistake that's why :)

    Thanks