Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Steps to resolve the error 'Table 'mysql.servers' doesn't exist"  (Read 2738 times)

0 Members and 1 Guest are viewing this topic.

joseletk

  • Guest
After plesk upgrade  or  with newly installed plesk , if you are not able to set the passwords for the
new database users or not able to do any kind of activity with the database users and mysql error log shows
[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist

Then here are steps which could be referred:

1)      Login to mysql with admin privileges

Code: [Select]
#mysql -uadmin -p`cat /etc/psa/.psa.shadow` -h localhost

2) Go into mysql database

Code: [Select]
# mysql> use mysql;
3) create server table.

Code: [Select]
# mysql> 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';
4) 'Server' table is created.

You should be able to operate the required database now.

======================================================================
Code: [Select]