Knowing my history of problems, it's a permissions issue. Where are mysql engines stored on a server so I can make sure I the right users have access to it?

Before anyone asks, yes, I've checked my my.cnf file, there is no line with skip-innodb

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# To enable the InnoDB Plugin, uncomment the 2 next lines
ignore-builtin-innodb
plugin-load=innodb=ha_innodb_plugin.so

# To enable InnoDB-related INFORMATION_SCHEMA tables
# Join the following options to above directive
  ;innodb_trx=ha_innodb_plugin.so
  ;innodb_locks=ha_innodb_plugin.so
  ;innodb_cmp=ha_innodb_plugin.so
  ;innodb_cmp_reset=ha_innodb_plugin.so
  ;innodb_cmpmem=ha_innodb_plugin.so
  ;innodb_cmpmem_reset=ha_innodb_plugin.so

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I need this engine to exist as I have existing tables with this engine.

I've also tried removing ib_logfile0 and ib_logfile1 and restarting the service, but that didn't work either.

From the log

111005 15:36:32 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
111005 15:36:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
111005 15:36:33 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
^G/usr/libexec/mysqld: Can't create/write to file '/tmp/ib2Z02k3' (Errcode: 13)
111005 15:36:33  InnoDB: Error: unable to create temporary file; errno: 13
111005 15:36:33 [ERROR] Plugin 'InnoDB' init function returned error.
111005 15:36:33 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
111005 15:36:33 [Warning] Found invalid password for user: 'dbtest1@%'; Ignoring user
111005 15:36:33 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50077, now running 50158. P$
111005 15:36:33 [ERROR] mysql.user has no `Event_priv` column at position 29
111005 15:36:33 [ERROR] Cannot open mysql.event
111005 15:36:33 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
111005 15:36:33 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.58'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Utter Ramblings
111005 15:40:56 [Note] /usr/libexec/mysqld: Normal shutdown

After tryping to upgrade

# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
FATAL ERROR: Upgrade failed

Definitely a permissions issue.


more

# mysql_fix_privilege_tables
This script updates all the mysql privilege tables to be usable by
the current version of MySQL

Got a failure from command:
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql --no-defaults --force --user=root --host=localhost --database=mysql
Please check the above output and try again.

Running the script with the --verbose option may give you some information
of what went wrong.

If you get an 'Access denied' error, you should run this script again and
give the MySQL root user password as an argument with the --password= option
link|improve this question

Yes, error 13 trying to make that temp file is blowing up InnoDB. What distribution are you on - got AppArmor or SELinux screwing things up? – Shane Madden Oct 5 '11 at 23:05
Don't know. How can I check? – stevether Oct 5 '11 at 23:06
Run 'getenforce' and see what it says. If it's 'Disabled' or 'Permissive' it's not enabled. Are you trying to use some type of high-availability innodb? It seems you are trying to load it via a plugin, are you sure the plugin is compatible with your MySQL version? – devicenull Oct 5 '11 at 23:54
1  
normally you move mysql's temp directory to its own folder, because marking /tmp as noexec blocks mysql from starting. – n8whnp Oct 6 '11 at 0:24
feedback

1 Answer

This is from your my.cnf

111005 15:36:33 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50077, now running 50158. P$
111005 15:36:33 [ERROR] mysql.user has no `Event_priv` column at position 29

That line scares me because if mysql.user it says MySQL 50077. That means your are attempting to use mysql.db created using MySQL 5.0.77. The next line indicates this as well because Events do not exist in MySQL 5.0.77. That's MySQL 5.1+ that has Events.

The permissions issue in MySQL is based on the bad alignment of columns in mysql.user and mysql.db

You also have this :

plugin-load=innodb=ha_innodb_plugin.so

I see two equal signs. Is this correct ???

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.