Thursday, August 23, 2012

Table 'mysql.servers' doesn't exist + plesk



Usually after the upgrade there errors that arise with MySQL in Plesk while creating users, errors such as "Table 'mysql.servers' doesn't exist"



To solve do the following:

1.SSH to your server

2. mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql
 
or

mysql -u YOURUSERNAMEHERE -p

Here YOURUSERNAMEHERE=Your actual user name which you are going to use.
Hit enter, you’ll be asked for your mysql password.

3: Use the mysql database command:
        USE mysql;

4.Then RUN the following:

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

If you don't have access to SSH, You can do this by logging into the webadmin for MySQL via Plesk, and running the above SQL command.
After that point, you will be able to add and delete as needed

And it worked for me:)

No comments:

Post a Comment