Reset MySQL Root Password
29 Oct
Posted by admin
in mysql
First of all you will need to ensure that your database is stopped:
/etc/init.d/mysql stop
Now you should start up the databa using the mysqld_safe command:
- /usr/bin/mysqld_safe --skip-grant-tables &
- [1] 6702
- mysqld_safe[6763]: started
Now that the server is running with the --skip-grant-tables flag you can connect to it without a password and complete the job:
Now that you've done that you just need to stop the server, so that you can go back to running a secure MySQL server with password restrictions in place.
This will now allow you to start the server:
Thats it! Now you should verify this by connecting with your new password.
Comments
Post new comment