Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Table 'mysql.servers' doesn't exist

Tags:

mysql

plesk

I get the error "Table 'mysql.servers' doesn't exist" from plesk when I try to create a new database user, the created user does not show up anywhere but the name is still reserved, and it does not allow me to access the database.

edit: I was unable to login to phpMyAdmin to this webserver, so instead I managed to login to it through a different domain, and it tells me a notice: Your PHP MySQL library version 5.0.90 differs from your MySQL server version 5.1.49. This may cause unpredictable behavior.

edit: manually installed phpmyadmin then manually installed libmcrypt (which is an accomplishment with my cruddy sever skills :D) so that phpmyadmin works. Then accidentally found out how to login as root via plesk (the trick is to enter webadmin without choosing any database), at least I think it's root :S ran the sql: GRANT SELECT ON mysql.* TO 'my-user'@'localhost'; with a success message went back to plesk to see if I can manage the sql with "my-user" and no, its still missing from the available users, but the name is still reserved... tried to run: mysql_fix_privilege_tables –user=root –password=mypasswordobviosuly –verbose but gave and error, and i'm still not sure how to run direct mysql commmands without using ssh (because i dont know the root password)

like image 285
Timo Huovinen Avatar asked Dec 06 '22 01:12

Timo Huovinen


1 Answers

I entered mysql via pre-installed phpmyadmin as 'root' like so: (in plesk) home-> database servers -> webadmin. Then choose the "mysql" database, if the table 'servers' is missing (probably some mysql bug) then it will need to be created: choose 'SQL' in 'phpmyadmin' to and run the following sql:

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

so that the table at least exists... then create a new user in plesk, and viola! it works! I was able to login as the user I created after that, it seems like it was some bug with some mysql update I did not even know about.

like image 143
Timo Huovinen Avatar answered Dec 08 '22 03:12

Timo Huovinen