Table 'mysql.servers' doesn't exist

ViAdCk

Verified User
Joined
Feb 14, 2005
Messages
300
Hi,

On one server when we change a user password through directadmin it gives the folowing error:

Error Flushing Privileges: Table 'mysql.servers' doesn't exist

But the password does change correctly. This also causes that mysql usernames aren't included in directadmin backups.

Any idea how this can be fixed?

Thanks!
 
Hello,

Try

Code:
mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf mysql

and execute the query

Code:
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
COMMENT='MySQL Foreign Servers table';

and/or run

Code:
mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --force
 
Update: changing the passwords inside directadmin doesn't give any errors but when we create a backup we see the following in the mysql error log:

[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist

When we restore the backup, the mysql users are missing.

Any idea how to fix this?
 
The "servers" table was created correctly and I can see the table correctly in phpmyadmin.

I haven't executed the following code:

Code:
mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --force

What does that code do exactly? I prefer not to update mysql on this server as we are moving users away from this server.
 
Back
Top