These forums are read-only!
Enabling InnoDB (Ubuntu Dapper Drake)
  • Hi,

    I thought I was running innodb on my MySQL db but when I check today it's disabled, it could be that it was never running.

    mysql> show engines;
    +------------+----------+----------------------------------------------------------------+
    | Engine | Support | Comment |
    +------------+----------+----------------------------------------------------------------+
    | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance |
    | MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
    | InnoDB | DISABLED | Supports transactions, row-level locking, and foreign keys |
    | BerkeleyDB | NO | Supports transactions and page-level locking |
    | BLACKHOLE | NO | /dev/null storage engine (anything you write to it disappears) |
    | EXAMPLE | NO | Example storage engine |
    | ARCHIVE | YES | Archive storage engine |
    | CSV | YES | CSV storage engine |
    | ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables |
    | FEDERATED | YES | Federated MySQL storage engine |
    | MRG_MYISAM | YES | Collection of identical MyISAM tables |
    | ISAM | NO | Obsolete storage engine |
    +------------+----------+----------------------------------------------------------------+
    12 rows in set (0.00 sec)



    Anyway, how do I enable it?

    I check my config file and there are no instances of skip-innodb, and the InnoDB settings look good. Is there a way to specifically enable InnoDB?
  • I then tried to add the following to my.conf:

    default-storage-engine = innodb

    But on restarting MySQL I get the following:

    $ sudo /etc/init.d/mysql restart
    Stopping MySQL database server: mysqld.
    Starting MySQL database server: mysqld.
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    ...failed or took more than 6s.
    Please take a look at the syslog.
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!


    Now, I'm not sure why that line would stop it from connecting!?!
  • Maybe I should re-install MySQL, unless anyone has an easier suggestion?
  • Well I re-installed MySQL via apt-get, and still no InnoDB.

    Is there an issue running InnoDB on Ubuntu Dapper server?
  • In /etc/mysql/my.cnf you'll find this line
    skip-innodb

    Comment it out ie make it a
    # skip-innodb

    Then restart mysql with a sudo /etc/init.d/mysql restart

    I did this a few minutes ago and it worked just fine.
  • Tried that already, still no joy.

    I've now resorted to upgrading to Hardy, as I've seen a couple of posts about InnoDB problems in Dapper.

    raghus, are you running Dapper?
  • trnsfrmr - no, I am on Gutsy. I am not an expert but I thought this would depend less on the OS and more on the DB version...?
  • I'm no expert either, but upgrading to Hardy has fixed my problem, I now have fully functioning InnoDB tables!