Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If you don't remember the password you set for root and need to reset it, follow these steps:
- Stop the mysqld server, this varies per install
- Run the server in safe mode with privilege bypass
- sudo mysqld_safe --skip-grant-tables;
- In a new window connect to the database, set a new password and flush the permissions & quit:
- mysql -u root
- For MySQL older than MySQL 5.7 use:
- UPDATE mysql.user SET Password=PASSWORD('your-password') WHERE User='root';
- For MySQL 5.7+ use:
- USE mysql;
- UPDATE mysql.user SET authentication_string=PASSWORD("your-password") WHERE User='root';
- Refresh and quit:
- FLUSH PRIVILEGES;
- \q
Add Comment
Please, Sign In to add comment