MySQL Host Is Not Allowed to Connect Server
If you encounter the “Host Is Not Allowed to Connect to This MySQL Server” error, it is typically due to MySQL’s default configuration, which restricts connections to the root user from localhost only. This prevents access from other IP addresses, such as a remote vScope server.
Solution: Configure MySQL for Remote Connections
Section titled “Solution: Configure MySQL for Remote Connections”To resolve this issue, you can either create a new administrator user with access from the vScope server or modify the root user’s access (not recommended).
Create a New Administrator User
Section titled “Create a New Administrator User”- 
Open MySQL prompt: Log in to your MySQL server as root.
 - 
Run the following commands:
CREATE USER 'vScopeUserName'@'localhost' IDENTIFIED BY 'password';GRANT ALL PRIVILEGES ON *.* TO 'vScopeUserName'@'localhost' WITH GRANT OPTION;CREATE USER 'vScopeUserName'@'vScopeServerIP' IDENTIFIED BY 'password';GRANT ALL PRIVILEGES ON *.* TO 'vScopeUserName'@'vScopeServerIP' WITH GRANT OPTION;FLUSH PRIVILEGES;- Replace 
vScopeUserNamewith the username for the new administrator user. - Replace 
passwordwith a strong password. - Replace 
vScopeServerIPwith the IP address of your vScope server. 
 - Replace 
 
This will create a new administrator user who can connect from both localhost and the specified remote IP address.
Modify the Root User (Not Recommended)
Section titled “Modify the Root User (Not Recommended)”If creating a new user is not possible, you can modify the root user’s permissions to allow connections from your vScope server:
- 
Run the following commands in the MySQL prompt:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'vScopeServerIP' IDENTIFIED BY 'password';FLUSH PRIVILEGES;- Replace 
vScopeServerIPwith the IP address of your vScope server. - Replace 
passwordwith therootpassword. 
 - Replace 
 
Important
Section titled “Important”After making these changes, MySQL will accept connections from the specified IP addresses. For enhanced security, use a strong password, avoid modifying the root user, and consider using a firewall to restrict access.
If you continue to experience issues, ensure that:
- MySQL’s bind-address is set to 
0.0.0.0or a specific IP in your MySQL configuration file (e.g.,/etc/mysql/mysql.conf.d/mysqld.cnf). - Firewall settings allow inbound connections to MySQL’s default port (3306).
 
By following these steps, you can allow secure remote access to your MySQL server from your vScope instance.