Symptoms
-
Upgrade MySQL databases fail with the following error:
# MYSQL_PWD=cat /etc/psa/.psa.shadow mysql_upgrade -uadmin
Phase 3/7: Fixing views
mysql.user
Error : The user specified as a definer ('mariadb.sys'@'localhost') does not exist
error : Corrupt
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1449 (HY000) at line 8: The user specified as a definer ('mariadb.sys'@'localhost') does not exist -
mariadb.sys user does not exist:
# plesk db "select host,user from mysql.user where user='mariadb.sys';"
#
Cause
The user mariadb.sys no longer exists, but is specified as a definer.
Resolution
-
Connect to the server via SSH
-
Rename the user.frm file:
# mv /var/lib/mysql/mysql/user.frm{,.bak}
-
Restart the MariaDB service:
# systemctl restart mariadb
-
Upgrade the MySQL databases to recreate the user table:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin --force
Note: In case the warning "This installation of MariaDB is already upgraded" is displayed, run the command with the option --force.
Comments
0 comments
Please sign in to leave a comment.