MySQL database failed! : SQL flush privile [FIXED]

MySQL database failed! : SQL flush privileges failed : Table ‘mysql.servers’ doesn’t exist at …/web-lib-funcs.pl line 1305.

I am getting this error when trying to setup a new virtual server. It seems to have started after manually upgrading to MySQL 5.1 and PHP 5.2

CentOS 5.2
Virtualmin 3.65
Webmin 1.450

Post edited by: djjerdog, at: 2009/02/13 05:37

Post edited by: djjerdog, at: 2009/02/13 05:38<br><br>Post edited by: djjerdog, at: 2009/02/13 14:58

Yeah, it doesn’t sound like it upgraded correctly.

How did you go about upgrading? And what version of MySQL had you been using?

The program "mysql_upgrade" should be run when upgrading MySQL versions, but normally that would be done for you if using an RPM.

But, if you run "mysql_upgrade" manually, it should fix your issue.

To be safe, I’d recommend making a database backup first.
-Eric

Yes, this is a broken MySQL, probably due to skipping the necessary upgrade step Eric mentioned. Not much Virtualmin/Webmin can do for you here.

mysql_upgrade was exactly it!

I ran:
mysql_upgrade -u "mysql admin account" -p

works perfectly now, Thank you!

helpful thread. i ran into several

Table upgrade required. Please do REPAIR TABLE or dump/reload to fix it

errors after doing mysql_upgrade. instead of fixing each table manually, i ran

mysqlcheck --check-upgrade --all-databases --auto-repair

and all the tables were fixed.