Linux > Plesk

Steps to resolve the error 'Table 'mysql.servers' doesn't exist"

(1/1)

joseletk:
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: ---#mysql -uadmin -p`cat /etc/psa/.psa.shadow` -h localhost

--- End code ---

2) Go into mysql database


--- Code: ---# mysql> use mysql;

--- End code ---
3) create server table.


--- Code: ---# 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.


--- End code ---
You should be able to operate the required database now.

======================================================================
--- Code: ---
--- End code ---

Navigation

[0] Message Index

Go to full version