How can I change the password for root user of MySQL to null — meaning no password or '' — from the MySQL command line client?
How can I change the password for root user of MySQL to null —
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can recover MySQL database server password with following five easy steps.
Step # 1: Stop the MySQL server process.
Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.
Step # 3: Connect to mysql server as the root user.
Step # 4: Setup new mysql root account password i.e. reset mysql password.
Step # 5: Exit and restart the MySQL server.
Here are commands you need to type for each step (login as the root user):
Step # 1 : Stop mysql service
Output:
Step # 2: Start to MySQL server w/o password:
Output:
Step # 3: Connect to mysql server using mysql client:
Output:
Step # 4: Setup new MySQL root user password
Step # 5: Stop MySQL Server:
Output:
Step # 6: Start MySQL server and test it
Source: http://www.cyberciti.biz/tips/recover-mysql-root-password.html