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)
5
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:
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.
It looks like your user does not have access to the
mysql
database. You may want to grant theSELECT
command as follows:This error can sometimes appear after a new installation of MySQL when the mysql table does not get created properly. Running the command…
from the bash prompt (not the MySQL prompt) will install the table and get things working.
After running the command above on a new installation the following command will help secure the install…
This will prompt you to enter a root password, remove anonymous access, limit root access to localhost only and remove the test database.
These commands are for Linux, they may not work on Windows but there are corresponding commands if you search the MySQL docs.
This is not related to the Plesk issue of the original poster but I stumbled upon this question while researching a MySQL installation problem and thought this might help save someone some time.
Found the following when attempting to upgrade. Was directed to the following page:
http://kb.parallels.com/en/112290
I ran the following from that page:
In my case
show tables
inmysql
database identifiesservers
table exists, but yet I got theError Table 'mysql.servers' doesn't exist
error.Listing
<data-dir>/mysql
directory revealedservers.frm
file exists, but relativeservers.MYI
andservers.MYD
files were missing – maybe I played a role on that!Anyhow knowing that I’m using the server as an intermediate server in a
Daisy Chain Replication
, I got a backup fromservers.frm
file and recreated the table by running the @timo-huovinen’s answer things got back to normal.It’s noteworthy that there was at least one other table (
plugin
) missingMYI
andMYD
files.