I am using ubuntu 16.04 and have just installed mysql. However, I am not able to access the mysql shell. I keep getting the Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Could you please help. Thanks.
I am using ubuntu 16.04 and have just installed mysql. However, I am not able to access the mysql shell. I keep getting the Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Could you please help. Thanks.
Maybe hard resetting the password helps. Alot of people are getting this issue.
Take a look here: https://stackoverflow.com/a/21685641/1863487
Thanks for the comments. I solved the problem by reinstalling mysql from the mysql-api-config_0.3.8.1_all.deb file and can now access the mysql shell.
I solve problem like this :
add
[mysqld]
skip-grant-tables
to this file -->
nano /etc/mysql/my.cnf'
then ---->
mysql -u root
set root password-->
UPDATE mysql.user SET authentication_string=PASSWORD('root'), plugin='mysql_native_password' WHERE User='root' AND Host='localhost';FLUSH PRIVILEGES;
exit console
\q
comment edited file with # on start of line
restart mysql -->
sudo service mysql restart
and at last -->
sudo mysql -u root -p`