MySQL

MySQL

Restore MySQL user

su mysql

echo “GRANT ALL PRIVILEGES ON *.* TO ‘root’@’localhost’ IDENTIFIED BY ‘booboobear’ WITH GRANT OPTION;”> /tmp/mysql-init
mysqld_safe –init-file=/tmp/mysql-init &
rm /tmp/mysql-init
mysql -uroot -p

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

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

The solution is below

linux/plesk

# mysql_fix_privilege_tables –user=admin –password=`cat /etc/psa/.psa.shadow` –verbose

This should definitely fix the problem.

linux/cpanel

# mysql_fix_privilege_tables –user=root –password=<mysql password here> –verbose

Go to Top