Guest User

Untitled

a guest
May 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).
  2.  
  3. $ mysqld --skip-grant-tables
  4.  
  5. Execute these statements.
  6.  
  7. $ mysql -u root mysql
  8. $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
  9. $mysql> FLUSH PRIVILEGES;
  10.  
  11. If the GRANT ALL doesn't work, try:
  12.  
  13. Stop mysqld and restart it with the --skip-grant-tables option.
  14. Connect to the mysqld server with just: mysql (i.e. no -p option, and username may not be required).
  15.  
  16. Issue the following commands in the mysql client:
  17.  
  18. UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root';
  19.  
  20. FLUSH PRIVILEGES;
  21.  
  22. After that, you should be able to run GRANT ALL ON *.* TO 'root'@'localhost'; and have it work.
Add Comment
Please, Sign In to add comment