Categories
Linux Plesk

New database user error “Table ‘mysql.servers’ doesn’t exist”

Had an issue reported today when a user created a new SQL Database, and then a new user. On creation of the new user in the Plesk control panel – they received the error “Table ‘mysql.servers’ doesn’t exist”.

[bash]mysql_fix_privilege_tables –user=admin –password= –verbose [/bash]

Had an issue reported today when a user created a new SQL Database, and then a new user. On creation of the new user in the Plesk control panel – they received the error “Table ‘mysql.servers’ doesn’t exist”.

mysql_fix_privilege_tables --user=admin --password= --verbose 

After running, the below output was generated

This script updates all the mysql privilege tables to be usable by
the current version of MySQL

You can safely ignore all 'Duplicate column' and 'Unknown column' errors
because these just mean that your tables are already up to date.
This script is safe to run even if your tables are already up to date!

ERROR 1060 (42S21) at line 102: Duplicate column name 'File_priv'
ERROR 1060 (42S21) at line 108: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 109: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 110: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 121: Duplicate column name 'ssl_type'
ERROR 1061 (42000) at line 131: Duplicate key name 'Grantor'
ERROR 1054 (42S22) at line 158: Unknown column 'Type' in 'columns_priv'
ERROR 1060 (42S21) at line 180: Duplicate column name 'type'
ERROR 1060 (42S21) at line 190: Duplicate column name 'Show_db_priv'
ERROR 1060 (42S21) at line 207: Duplicate column name 'max_questions'
ERROR 1060 (42S21) at line 217: Duplicate column name 'Create_tmp_table_priv'
ERROR 1060 (42S21) at line 220: Duplicate column name 'Create_tmp_table_priv'
ERROR 1060 (42S21) at line 345: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 348: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 351: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 357: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 360: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 363: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 380: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 383: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 386: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 392: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 395: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 398: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 401: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 404: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 417: Duplicate column name 'max_user_connections'
ERROR 1060 (42S21) at line 426: Duplicate column name 'Create_user_priv'
ERROR 1060 (42S21) at line 448: Duplicate column name 'Routine_type'
ERROR 1054 (42S22) at line 573: Unknown column 'Event_priv' in 'where clause'
ERROR 1060 (42S21) at line 589: Duplicate column name 'sql_mode'
ERROR 1060 (42S21) at line 628: Duplicate column name 'originator'
ERROR 1060 (42S21) at line 632: Duplicate column name 'time_zone'
ERROR 1060 (42S21) at line 635: Duplicate column name 'character_set_client'
ERROR 1060 (42S21) at line 641: Duplicate column name 'collation_connection'
ERROR 1060 (42S21) at line 647: Duplicate column name 'db_collation'
ERROR 1060 (42S21) at line 653: Duplicate column name 'body_utf8'
ERROR 1054 (42S22) at line 663: Unknown column 'Trigger_priv' in 'where clause'
done

After the above completed, I removed the erroneous user which failed to complete and setup a new user with success this time.

By Mik Canavan

I'm a tech obsessed and self-confessed geek. As the Technical Director at Fivenines UK, I'm lucky that I get to faf with gadgets, design websites and fix servers...

Leave a Reply

Your email address will not be published. Required fields are marked *