Labels

Monday 14 April 2014

[MYSQL] #1045 error And reset password

iff you actually have set a root password and you've just lost/forgotten it:
  1. Stop MySQL: sudo /etc/init.d/mysql start or mysql start
  2. Restart it manually with the skip-grant-tables option:  mysqld_safe --skip-grant-tables
  3. Run the MySQL client: mysql -u root
  4. Reset the root password manually with this MySQL command: UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
  5. Flush the privileges with this MySQL command: FLUSH PRIVILEGES;
From http://www.tech-faq.com/reset-mysql-password.shtml
(Maybe this isn't what you need, Abs, but I figure it could be useful for people stumbling across this question in the future)

source:  http://stackoverflow.com/questions/489119/mysql-error-1045-access-denied

No comments:

Post a Comment