Mysql Error “Access denied for user ‘user’@’localhost’ (using password: YES) “

0
12
views

Error “Access denied for user ‘user’@’localhost’ (using password: YES) “  in Mysql Server. When you try to login Mysql server from remote host or locally . To solve this issue you will have to give grant permission for user to access the database or login remotely.

This command will allow you to access the database

GRANT ALL PRIVILEGES On DATABASE.* TO ‘USER’@’IP ADDRESS’;

Check Out Grant Permission On Database In Mysql

Grant Permission for remote login

GRANT ALL PRIVILEGES On DATABASE.* TO ‘USER’@’IP ADDRESS’ IDENTIFIED BY ‘PASSWORD’;

To make it work you will have to install the Mysql client on server where from you’re trying to access the remote database server

Install Mysql Client  by command

yum install mariadb mariadb-libs 

Now try to login Mysql Server from remote location. You will be accessible now.

mysql -h localhost -u username -p

You’re done

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here