Error: Connection to the database server failed: Table ‘mysql.servers’ doesn’t exist on plesk server

When the mysql version on plesk server get’s upgraded we get an error while adding an user to the database:

Error: Connection to the database server failed:  Table ‘mysql.servers’ doesn’t exist

To remove the follow the steps mention below:

SSH to your server

Open mysql by typing:

mysql -u YOURUSERNAMEHERE -p

Here use your actual user name which you are going to use.

Hit enter, you’ll be asked for your mysql password.

Use the mysql database:

USE mysql;

Place this code in to create the table:

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';

 

That’s done, now you will not get the error again.