Column count of mysql.db is wrong

Column count of mysql.db is wrong

Column count of mysql.db is wrong 150 150 Roderick Derks

Error on starting mysqld

# tail -f /var/log/mysqld.log

120807 14:48:55  InnoDB: Started; log sequence number 0 161811
120807 14:48:55 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50***, now running 50***. Please use mysql_upgrade to fix this error.
120807 14:48:55 [ERROR] mysql.user has no `Event_priv` column at position 29
120807 14:48:55 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
120807 14:48:55 [Note] /usr/libexec/mysqld: ready for connections. Version: ‘5.*.**’  socket: ‘/var/lib/mysql/mysql.sock’  port: 3306  Source distribution
 

 

# mysql_fix_privilege_tables –verbose –password=************
This script updates all the mysql privilege tables to be usable by
the current version of MySQL

You can safely ignore all ‘Duplicate column’ and ‘Unknown column’ errors
because these just mean that your tables are already up to date.
This script is safe to run even if your tables are already up to date!

ERROR 1060 (42S21) at line 102: Duplicate column name ‘File_priv’
ERROR 1060 (42S21) at line 108: Duplicate column name ‘Grant_priv’
….
ERROR 1054 (42S22) at line 663: Unknown column ‘Trigger_priv’ in ‘where clause’
done

# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

# tail -f /var/log/mysqld.log
120807 15:02:34  InnoDB: Starting shutdown…
120807 15:02:36  InnoDB: Shutdown completed; log sequence number 0 161811
120807 15:02:36 [Note] /usr/libexec/mysqld: Shutdown complete

120807 15:02:36 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120807 15:18:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120807 15:18:44  InnoDB: Started; log sequence number 0 161811
120807 15:18:44 [Note] Event Scheduler: Loaded 0 events
120807 15:18:44 [Note] /usr/libexec/mysqld: ready for connections.Version: ‘5.*.**’  socket: ‘/var/lib/mysql/mysql.sock’  port: 3306  Source distribution

 

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message