Ticker

6/recent/ticker-posts

Ad Code

How to fix mysql error: Access Denied for User 'root'@'localhost' (using password: YES)

 Access Denied for User 'root'@'localhost' (using password: YES) 


are you wonder seeing this error. actually this is not an error

in mysql 8.0 or latest there is using different type authentication mechanism

that is it checks which local user is login to MySQL. in above case you are login from a local normal user to MySQL root user


if you switch the normal user to root

# su root or  #sudo su root

it will work 

Solution for this

# sudo mysql


# SELECT user,authentication_string,plugin,host FROM mysql.user;






# ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';


# FLUSH PRIVILEGES;


# SELECT user,authentication_string,plugin,host FROM mysql.user;





Post a Comment

0 Comments