1130 - Host 'DESKTOP-BS10KG2' is not allowed to connect to this MySQL server
时间: 2023-12-23 20:08:12 浏览: 59
This error message indicates that the MySQL server you are trying to connect to is not configured to allow connections from the host "DESKTOP-BS10KG2".
To resolve this issue, you need to grant permission for the host "DESKTOP-BS10KG2" to connect to the MySQL server. This can be done by adding an entry in the MySQL user table for the host and granting the necessary privileges.
Here are the steps to do this:
1. Log in to the MySQL server using an account with administrative privileges.
2. Run the following command to create a new user account for the host "DESKTOP-BS10KG2":
CREATE USER 'username'@'DESKTOP-BS10KG2' IDENTIFIED BY 'password';
Replace 'username' and 'password' with the desired username and password.
3. Grant necessary privileges to the user account:
GRANT ALL PRIVILEGES ON *.* TO 'username'@'DESKTOP-BS10KG2';
This grants all privileges to the user account on all databases and tables. You can specify more fine-grained privileges if needed.
4. Flush the privileges to ensure they take effect:
FLUSH PRIVILEGES;
After completing these steps, you should be able to connect to the MySQL server from the host "DESKTOP-BS10KG2" without encountering the error message.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)