Error: Access Denied for User
Issue
Setup tests fail. The following error appears:
Test connection exception with cause: Access denied for user (using password: YES). Current charset is UTF-8. If password has been set using other charset, consider using option 'passwordCharacterEncoding'.
Environment
Google Cloud MySQL connectors using the direct connection method.
Resolution
To resolve this issue, do the following:
- See our IP Addresses documentation and safelist the applicable IP addresses for your provider, region, and location.
- In the Google Cloud console, go to your Google Cloud SQL instance overview page.
- In the SQL navigation menu, click Connections, then select the Settings tab.
- Under SSL mode, select Allow only SSL connections.
See the Google Cloud SSL/TLS certificate configuration documentation for more information.
Cause
This issue may occur for either of the following reasons:
- The server associated with your Google Cloud MySQL instance rejects connections from our IP addresses.
- Your Google Cloud MySQL instance is configured to require valid client certificates for authentication. However, this is incompatible with our direct connection method, which only supports server certificate authentication.