簡體   English   中英

MySQL服務器遠程訪問被拒絕

[英]MySQL Server Remote Access Denied

我正在使用MySQL 8.0設置開發服務器,並嘗試從我的筆記本電腦以root身份遠程連接到Workbench。 這使我獲得訪問被拒絕的錯誤,因此,嘗試應用其他地方提供的解決方案,例如,授予所有特權...,我仍然沒有到達那里。 自發布這些解決方案以來,也許有所更改(例如[ 啟用遠程MySQL連接:錯誤1045(28000):用戶的訪問被拒絕 )。

從服務器:

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -ppassword
mysql> grant all privileges on *.* to 'root'@'%' identified by 'password';

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near 'identified by 'password'' at line 1

如果我刪除該零件,則該消息會抱怨:

mysql> grant all privileges on *.* to 'root'@'%';

ERROR 1410 (42000): You are not allowed to create a user with GRANT

有什么建議嗎?

謝謝!

R.

在第一個命令中,您的密碼拼寫錯誤,應該是

mysql -uroot -password

而且我認為您在服務器上錯誤地設置了MySQL,然后重新安裝並鍵入

mysql_secure_installation

它會要求輸入密碼和用戶名,然后創建並使用。
希望這可以幫助

暫無
暫無

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

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