Total Pageviews

Tuesday, 24 June 2008

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) on Ubuntu

Add a user and password to Mysql on Ubuntu Gutsy 7.10

The first time you install Mysql, when you try tu run it you may get this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO),

You need to add a password to your root user:

mysql -u root -p

Then it will ask you to enter a pass word for the root user:

mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD(’new-password’) WHERE user=’root’;
mysql> FLUSH PRIVILEGES;

Do not use your root user password this time enter a new password.



No comments: