ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
February 6th, 2010
For some reason after setting up replication the root password on both master and slave were cleared. This has happened more than once. Note that i can access mysql via…
$mysql -u root -p
mysql>
Of course this is not desirable. Simply reset the password on the master and the table propegates to the slave and fixes the problem.
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;