我已授予所有的權限的用戶名:訪問MySQL數據庫上否認
GRANT ALL PRIVILEGES ON my_db . * TO 'website_user'@'xx.xx.xx.xx' IDENTIFIED BY 'password'
嘗試訪問數據庫,是yy.yy.yy.yy
從xx.xx.xx.xx
:
mysqldump -P 3306 -u website_user -ppassword -h yy.yy.yy.yy my_db > test.sql
但仍然得到以下錯誤:
mysqldump: Got error: 1045: Access denied for user 'website_user'@'xx.xx.xx.xx' (using password: YES) when trying to connect
我也檢查過防火牆。沒有什麼阻止運行此查詢。我究竟做錯了什麼?
'flush privileges'? –
我重新啓動了'mysql'。並且還嘗試了'flush privileges' –
確保密碼沒有任何shell元字符,就像'$',例如'-pfoo $ bar'不是密碼'foo $ bar'。它是密碼'foo'後面跟着一個未定義的shell var'$ bar'。 –