Remote MySQL Connection Error: Access Denied (1045)
To enable remote connections to a MySQL server, certain configurations must be in place. Let's investigate the issue you're facing and provide a solution.
Problem: When attempting to connect to MySQL remotely from a different IP address, you receive the error "ERROR 1045 (28000): Access denied for user 'root'@'192.168.233.163'". This suggests that remote connections are currently not allowed for the specified user or from the remote IP address.
Solution:
Grant Permissions: As the root user, execute the following commands:
Alternatively, you can replace the % entry for the user root in the mysql.user table with a specific IP address. Ensure that the IP address used corresponds to the remote machine from which you want to connect.
Note: Remember to replace 'redacted' with the actual password and 192.168.233.163 with the appropriate IP address. Also, replace *.* with the database and table permissions you wish to grant.
The above is the detailed content of How to Fix MySQL Remote Connection Error 1045: Access Denied?. For more information, please follow other related articles on the PHP Chinese website!