Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Log in to your account using SSH.
- # Stop the MySQL server.
- service mysqld stop #for Centos and Fedora
- service mysql stop #for Debian and Ubuntu
- # Restart the MySQL server with the —skip-grant-tables option
- mysqld_safe --skip-grant-tables &
- # Log into MySQL.
- mysql
- # At the mysql> prompt, reset the password.
- UPDATE mysql.user SET Password=PASSWORD('NEW-YOUR-PASSWORD') WHERE User='root';
- # At the mysql> prompt
- FLUSH PRIVILEGES;
- exit;
- # Stop the MySQL server.
- mysqladmin -u root -p shutdown
- # Start Mysql
- service mysqld start #for Centos & Fedora
- service mysql start #for Debian & Ubuntu
Add Comment
Please, Sign In to add comment