Cara Mengatasi MySQL Server Error #1045 #2002

Bismillah... cmiw

Have you ever installed phpmyadmin and got these errors:
  • #2002 Cannot log in to the MySQL server
  • #1045 Cannot log in to the MySQL server
Here's the simple solution, but if you have another better than this, please write it in comment box :D
  1. Stop the mysql demon process using this command :
    sudo service mysql stop
  2. Start the mysqld demon process using the --skip-grant-tables option with this command:
    sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
  3. Start the mysql client process using this command:
    mysql -u root
  4. From the mysql prompt execute this command to be able to change any password:
    FLUSH PRIVILEGES;
  5. Then reset/update your password and quit:
    SET PASSWORD FOR root@'localhost' = PASSWORD('password');
    quit
  6. Start the mysql demon process using this command :
    sudo service mysql start
Now, you can log in to MySQL as root user. Try to reopen from your browser!

Comments

Populer Post

Extract Database With Sqlmap

How To Install Mutillidae And Try A Little Test