Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Stop the service
- sudo /etc/init.d/mysqld stop
- # start the mysql server in safe mode
- /usr/bin/mysqld_safe --skip-grant-tables &
- # Access the mysql console
- mysql
- mysql> use mysql;
- mysql> update user set password=PASSWORD("new-password-here") where User='root';
- mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS,
- FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES,
- LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW,
- SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT,
- TRIGGER ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*HASHED-PASSWD' WITH GRANT OPTION ;
- mysql> flush privileges;
- mysql> quit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement