2015-06-08 101 views
0

我試圖連接到MySQL服務器使用查詢Browser.But,我在Windows命令提示符Host is not allowed to this MySQL server instance我收到以下錯誤信息我嘗試了所有建議在堆棧溢出像GRANT命令,然後嘗試訪問。這可能是一個「重複」的問題。但請回答我。訪問被拒絕,當我嘗試連接到MySQL服務器

Microsoft Windows [Version 6.1.7601] 
    Copyright (c) 2009 Microsoft Corporation. All rights reserved. 

C:\Users\Admin>mysql 
Welcome to the MySQL monitor. Commands end with ; or \g. 
Your MySQL connection id is 211 
Server version: 5.0.95-community-nt MySQL Community Edition (GPL) 

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 

    Oracle is a registered trademark of Oracle Corporation and/or its 
    affiliates. Other names may be trademarks of their respective 
owners. 

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 


    mysql> GRANT ALL ON *.* TO 'root'@'123.28.88.45' WITH GRANT OPTION; 
    ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO) 
    mysql> GRANT ALL ON *.* TO 'root'@'123.28.88.45' WITH GRANT OPTION 
-> FLUSH PRIVILEGES 
-> mysql -u root -p 
-> \q 

回答

0

嘗試使用mysql -uroot -p而不是mysql登錄。 您最後一次授予命令失敗,因爲您錯過了分號。

BR Chris

相關問題