Get the most out of your Centmin Mod LEMP stack
Become a Member

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 Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    5:41 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    12:41 PM
    Nginx 1.13.x
    MariaDB 5.5
    those commands are run from mysql client not ssh client
     
  3. pamamolf

    pamamolf Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    5:41 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    12:41 PM
    Nginx 1.13.x
    MariaDB 5.5
    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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    12:41 PM
    Nginx 1.13.x
    MariaDB 5.5
    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)
     
    • Agree Agree x 1
  6. pamamolf

    pamamolf Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    5:41 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Mysql exited by mistake that's why :)

    Thanks
     
    • Funny Funny x 1