How to grant root user all privileges while skip-grant-table is enabled
Hello,
In PHPMyAdmin-->mysq DB--> user Table, the user root at localhost does not have any GLOBAL PRIVILEGES, while on other rows like hostname or 127.0.0.1 has all privileges enabled.
Due to this issue, I cannot run mysql in SSH because I get access denied root@localhost using password=yes error.
Only if I enable skip-grant-tables option in /etc/my.cnf, I can login to PHPMyAdmin or mysql in SSH, but still I cannot grant privileges.
I tried running FLUSH PRIVILEGES or GRANT but it affects 0 row.
Do you please help me what should I do?
-
No, the issue is when skip-grant-tables is enabled, I cannot run queries like SET, UPDATE, INSERT, DELETE. But I only can run SELECT. When skip-grant-tables is disabled, I cannot login to mysql. When I see mysql table with skip-grants enabled, I see all _priv rows' values are Y. What I mean is when you click on root under user column which opens a new tab. There, root@localhost does not have any privileges and cannot manipulate other users (including itself). 0 -
HI Can you please run following commands and then test GRANT ALL PRIVILEGES ON . TO 'root'@'%'WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; Regards HostNoc 0
Please sign in to leave a comment.
Comments
3 comments