System Administration & Network Administration
mysql permissions root
Updated Fri, 20 May 2022 11:51:14 GMT

MySQL root problems (access denied for root user)

I've having some very weird issues with my MySQL (5.5) root user. I'm trying to allow an external host to access the root user, but it seems as though my root@localhost does not have "GRANT OPTION" to the local databases! I think the issue at this point is caused by the fact that I think I have two root@localhost users, both with different grant rules, but I can't figure out how to get back into my install.

I've already tried deleting the root user and recreating it (I think), resetting the root users password (modifying the mysql database itself)

I can't get into the root account using the password I've always specified but rather an alternate password, which I don't even know how I got... this alternate user is the one that doesn't seem to have full root permissions, yet is still called root.



Found the solution -- This is caused by updating MySQL from MySQL 5.1 to MySQL 5.5 and moving the authentication schema (the MySQL database itself) along with it. As there are core updates to this schema using it with a 5.5 database simply won't work causing two main bugs: Cannot GRANT privileges as root Mysql users deleted

Comments (2)

  • +7 – It's not a solution, it's a cause. How to fix it? — Mar 25, 2015 at 08:13  
  • +0 – Maybe mysql_upgrade will be the answer? I'm facing the same problem.. — Apr 02, 2018 at 05:47