0

I am trying to enable InnDB on my linux server. I have installed Ubuntu 10.04 JeOS on an ESX server. I then installed mySQL and tomcat using aptitude. However when I use SHOW ENGINES; in mySQL it does not appear that InnoDB was installed. I then tried following the directions in the documentation. http://dev.mysql.com/doc/refman/5.1/en/innodb.html However I get the following when trying to enable a plugin:

ERROR 1123 (HY000): Can't initialize function 'InnoDB'; Plugin initialization function failed.

I would appreciate some advice as to how to approach this problem.

spowers
  • 143
  • 1
  • 5

4 Answers4

3

I had the same issue. In 10.04, apparmor does not allow MySQL to read the InnoDB plugins. Add the following lines to /etc/apparmor.d/usr.sbin.mysqld:

/usr/lib/mysql/plugin/ r, /usr/lib/mysql/plugin/* mr,

Then reload apparmor and restart the MySQL service.

2

It sounds like the Jeos version of the mysql package decided not to compile innodb into the binaries for whatever reason. Not sure why, my 10.04 desktop here does have it enabled. At any rate, the default my.cnf doesn't enable the plugin.

Assuming that the innodb plugin files (ha_innodb_plugin.so, etc) are in /usr/lib/mysql/plugins, you can follow the instructions below to enable it.

http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-plugin-installation-dynamic-posix.html

If the innodb plugins aren't in that directory, you should probably try to install regular ubuntu's mysql .deb or grab a package directly from dev.mysql.com.

  • The plugins are present in the directory. I actually was getting the error mentioned above why trying to enable them as mentioned in the above link. I tried the addition to the my.cnf file, as well as the command line import. I have also noticed that innodb appears to be enabled on both my desktop machines. I may try to install the full server version on a VM to see if it is just a JeOS issue. – spowers May 25 '10 at 12:07
1

If specified, comment skip-innodb in your my.cnf and restart MySQL.

These are the settings that the my-large.cnf example configuration provides that can be specified to enable InnoDB:

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/data/
#innodb_log_arch_dir = /usr/local/mysql/data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 256M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 64M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
Warner
  • 23,756
  • 2
  • 59
  • 69
1

If you enable innodb_data_file_path or edit the value then Innodb doesn't enable. So you have to stop mysql, and delete the data files. Then it will start with the new file size settings you chose:

sudo rm /var/lib/mysql/ib*   (WARNING this deletes the database)
sudo /etc/init.d/mysql start
service mysql status to check if running
Query ENGINES for Innodb to be YES.

Unfortunately I don't know how to make Innodb the default on Mysql 5.1.61 on Ubuntu 10.04.

malhal
  • 111
  • 4