有沒有人知道爲什麼我運行mysqlimport時出現這個錯誤?mysqlimport:錯誤:1045,拒絕訪問
mysqlimport -u someone -pwhatever --columns=a,b,c,d,e bar /var/tmp/baz.sql
mysqlimport: Error: 1045, Access denied for user 'someone'@'%' (using password: YES), when using table: baz
但是......
mysql -u someone -pwhatever
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 199
Server version: 5.1.41-3ubuntu12.10 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show grants;
+------------------------------------------------------------------------------------------------------------+
| Grants for [email protected]% |
+------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'someone'@'%' IDENTIFIED BY PASSWORD '*BLAHBLAHBLAH' |
| GRANT ALL PRIVILEGES ON `bar`.* TO 'someone'@'%' |
+------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql>
如果您在設置不同的參數後收到'ERROR 1221(HY000):DB GRANT和GLOBAL PRIVILEGES'的錯誤用法,請回到此答案顯示的內容:「將GRANT FILE ON *。*添加到user @ localhost;」 - 「FILE權限是全局性的,不能應用於單個數據庫」 –