簡體   English   中英

當我嘗試連接到mysql服務器時訪問被拒絕

[英]Access denied when i try to connect to mysql server

我正在嘗試使用查詢瀏覽器連接到MySQL服務器。但是,我在Windows命令提示符中收到以下錯誤消息, Host is not allowed to this MySQL server instance我嘗試了STACK OVERFLOW like- GRANT命令和然后嘗試訪問。 這可能是一個“重復”的問題。 但是請回答我。

 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

嘗試使用mysql -uroot -p而不是mysql登錄。 您的最后一個Grant-Command失敗,因為您錯過了分號。

克里斯·克里斯

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM