1

Database select error its my problem and when I restart my mysql to fix this error this problem solve but after 30 minutes or after hours again this error happen again.

I put link here screenshot from ssh [putty] of errors what should i do? for what reason this happen?

tail -f /var/log/mysqld.log
120813 17:33:57 InnoDB: Completed initialization of buffer pool
120813 17:33:57 InnoDB: highest supported file format is Barracuda.
120813 17:33:57  InnoDB: Waiting for the background threads to start
120813 17:33:58 InnoDB: 1.1.8 started; log sequence number 63473783633
120813 17:33:58 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50092, now running 50516. Please use mysql_upgrade to fix this error.
120813 17:33:58 [ERROR] mysql.user has no `Event_priv` column at position 29
120813 17:33:58 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
120813 17:33:58 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.16'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi

3 Answers 3

0
  1. reinstall your mysql but idont recommend use mysql_upgrade
  2. check user table in mysql db it seems it has missing column or row
  3. Repair Corrupted Databases use mysqlcheck -rA -u root -p
1
  • 1
    reinstall was best way for me .....tanx for your answer Aug 21, 2012 at 11:00
0

Run mysqlcheck, see here -- http://scottlinux.com/2012/06/09/use-mysqlcheck-to-optimize-and-repair-mysql-databases/

Also, check if your RAM/disks have no issues. Also, upgrade to the latest release of whatever version of MySQL you are running.

0

If you have recently upgraded mysql, you may be missing some columns in the system tables or something just didn't upgrade correctly. take a look at mysql_upgrade. earlier versions of mysql, you'd have to use mysql_fix_privilege_tables. it was removed in 5.5 i believe.

don't forget to back up you database(s) before you do anything in your db.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .