Access denied for user 'root'@'localhost' I'm trying to login into fresh install mysql with:

sudo /usr/local/mysql/bin/mysql -u root


But getting following error:

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


The mysql server started with:

sudo /usr/local/mysql/bin/mysqld --user=root


What is the default login/password for mysql root user? 

Thank you.
You can reinit the password :

1.stop mysql

/etc/init.d/mysql stop


2.start mysql safe :

mysqld_safe --skip-grant-tables &amp;


3.connect to mysql

mysql -u root


4.change the password

mysql&gt; use mysql;
mysql&gt; update user set password=PASSWORD(”YOUR_PASSWORD”) where user=’root’;
mysql&gt; flush privileges;
mysql&gt; quit


5.stop mysql

/etc/init.d/mysql stop


6.start mysql

/etc/init.d/mysql start


Then you can connect to mysql with login root and the new password.