How to Solve #1045 Cannot log in to the MySQL server - DC Geek

Breaking

DC Geek

I am still Learning

Follow By Mail

test banner

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Monday, April 1, 2013

How to Solve #1045 Cannot log in to the MySQL server



If you are getting this error then you need to reset the mysql  password of  ROOT  user

To reset the mysql password of ROOT user,Just follow these steps

Step 1: Stop the mysql Damon Process

             sudo service mysql stop

Step 2: Start the mysqld demon process using the --skip-grant-tables option

            sudo  /usr/sbin/mysqld --skip-grant-tables --skip-networking &

Step 3: Start the mysql client process


          mysql -u root

Step 4: From the mysql prompt execute this command to change any Password

            FLUSH PRIVILEGES;

Step 5: Then reset/update your password and quit
           
           SET PASSWORD FOR root@'localhost' = PASSWORD('password');
           quit

Step 6: Start the mysql demon process

           sudo service mysql stop

No comments:

Post a Comment

Post Top Ad

Responsive Ads Here