简体   繁体   中英

Access denied for user 'xxx'@'localhost'

I'm trying to connect the database, but i'm getting the issue like Access denied for user 'xxx'@'localhost'. Can anybody help me to fix the issue ?

Your connection attempt failed for user 'xxx' from your host to server at localhost:3306:
  Access denied for user 'xxx'@'localhost'

Please:
1 Check that mysql is running on server localhost
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the xxx has rights to connect to localhost from your address (mysql rights define what clients can connect to the server and from which machines) 
4 Make sure you are both providing a password if needed and using the correct password for localhost connecting from the host address you're connecting from

You have to create user xxx@localhost

Create user 'xxx'@'localhost' identified by password 

GRANT ALL PRIVILEGES ON *.* TO 'xxx'@'localhost'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM