Advertisement
Guest User

Untitled

a guest
May 13th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. # Stop the service
  2. sudo /etc/init.d/mysqld stop
  3.  
  4. # start the mysql server in safe mode
  5. /usr/bin/mysqld_safe --skip-grant-tables &
  6.  
  7. # Access the mysql console
  8. mysql
  9.  
  10. mysql> use mysql;
  11. mysql> update user set password=PASSWORD("new-password-here") where User='root';
  12. mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS,
  13. FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES,
  14. LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW,
  15. SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT,
  16. TRIGGER ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*HASHED-PASSWD' WITH GRANT OPTION ;
  17. mysql> flush privileges;
  18. mysql> quit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement