简体   繁体   中英

Access denied on MySQL database

I have granted all privileges to username:

GRANT ALL PRIVILEGES ON my_db . * TO  'website_user'@'xx.xx.xx.xx' IDENTIFIED BY 'password'

Trying to access database which is in yy.yy.yy.yy from xx.xx.xx.xx :

mysqldump -P 3306 -u website_user -ppassword -h yy.yy.yy.yy my_db > test.sql

But still getting below error:

mysqldump: Got error: 1045: Access denied for user 'website_user'@'xx.xx.xx.xx' (using password: YES) when trying to connect

I also checked firewall. Nothing is preventing to run this query. What am I doing wrong?

Have you also run the following query:

FLUSH PRIVILEGES

That is required to make the new permissions to take effect.

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