I'm pulling my hair out trying to decipher why every time I do a fresh install of mysql on OSX and import a database, the minute I restart the mysql instance I'm prompted with the message: Access denied for user 'root'@'localhost' (using password: YES). I've kept the password to defaulted root, and this is quit frustrating. I've tried my hardest to ensure no other instances of mysql are running. The Activity monitor reports no other instances of mysql, and when searching for pids no other instances appear. Does anyone know what is happening?
This error can occur when you import SQL tables that contain the MySQL database itself, this database contains the underlying schema that MySQL itself uses, this can cause serious issues when attempting to get into the database. Make sure that your imported SQL dump only includes the database you wish to import and nothing more. |
|||||||||||
|
This error could occur in the following cases 1. Using an incorrect password. Since you mentioned that you have defaulted the password to root check if you have the CAPS lock on 2. It could occur if you have an incorrect password specified in an option file. Try logging in using mysqladmin --no-defaults -u root -p pass 3. You might have to grant access to root. Stop MySQL - /etc/init.d/mysql stop Start MYSQL skippping grants - /usr/sbin/mysqld --skip-grant-tables --skip-networking & Login - mysql -u root Flush privileges - FLUSH PRIVILEGES; Update Password - SET PASSWORD FOR root@'localhost' = PASSWORD('password'); UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'; |
|||
|
mysql_upgrade
command? dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html – J Moore Jul 27 at 2:42