I am using MySQL. My root user doesn't have all privileges. How can I get all privileges back to the root user? How to do it step by step?
相关问题
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- MySQL: conduct a basic search
- Why sometimes there is one of more gap(s) in the v
- mySQL alter table on update, current timestamp
This worked for me on Ubuntu:
Stop MySQL server:
Start MySQL from the commandline:
In another terminal enter mysql and issue:
You may also want to add
and optionally use a password as well.
and then exit your MySQL prompt and then kill the mysqld server running in the foreground. Restart with
Log in as root, then run the following MySQL commands:
If you facing grant permission access denied problem, you can try mysql_upgrade to fix the problem:
Login as root:
Run this commands: