Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?![enter image description here][1]

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
share|improve this question

3 Answers 3

up vote 0 down vote accepted
  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
share|improve this answer
1  
reinstall was best way for me .....tanx for your answer –  user1574533 Aug 21 '12 at 11:00

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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