How to grant root user all privileges while skip-grant-table is enabled

Inna

Active Member
Mar 10, 2018
30
6
8
Iran
cPanel Access Level
Root Administrator
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 [email protected] 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?
 

Inna

Active Member
Mar 10, 2018
30
6
8
Iran
cPanel Access Level
Root Administrator
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, [email protected] does not have any privileges and cannot manipulate other users (including itself).