ERROR granting access for DB user: Access denied for user 'root'@'%' to database during upgrade
Resolving "access denied" error for root user during ezeelogin upgrade
Overview: This article covers resolving the "Access denied for user 'root'@'%' to database 'ezlogin_sdzeh'" error during an Ezeelogin upgrade. Verify root privileges with show grants for 'root'@'localhost';. If necessary, grant all privileges to the root user, or restore privileges by restarting MySQL with mysqld_safe --skip-grant-tables, then use flush privileges; and grant all privileges on *.* to 'root'@'localhost' with grant option.
if you get the error "ERROR granting access for DB user: Access denied for user 'root'@'%' to database 'ezlogin_sdzeh' "while upgrading Ezeelogin installation to the latest version, check your privileges as the root user with the command:
mysql> show grants for 'root'@'localhost';
After checking your privileges you can try to give another user all the privileges, or you can try to give the root user all privileges again:
mysql> grant all privileges on *.* to 'root'@'localhost';
If your root user doesn't have privileges you can try to restore them, so
Stop the mysqld server, restart the server this way mysqld_safe --skip-grant-table and restore root privileges with:
mysql> flush privileges;
mysql> grant all privileges on *.* to 'root'@'localhost' with grant option;
Related Articles
How to set MySQL root password
How to reset mysql or Mariadb root password ?
Basic MySQL commands for troubleshooting database related issues in Ezeelogin