KNOWLEDGE BASE

Error "Access denied for user" Connecting to Google Cloud SQL


Published: 06 Apr 2018
Last Modified Date: 06 Apr 2018

Issue

When trying to connect to Google Cloud SQL, the following error may occur:
[MySQL][ODBC 5.3(w) Driver]Access denied for user '<user name>'@<Server name or IP address> (using password: YES)
Invalid username or password.

Environment

  • Tableau Desktop
  • Google Cloud SQL

Resolution

Please try the following troubleshooting steps:
  1. Ensure that the database password does not contain any of the following special characters:
    • [] {}() , ; ? * ! @.
  2. Try to connect to Google Cloud SQL from MySQL Workbench using the same server name and credentials. If you are unable to connect using MySQL Workbench, verify that you are using the correct password.
  3. If the above steps do not resolve the issue, try using the Other Databases (ODBC) connector in Tableau Desktop with the MySQL driver: 
  4. In the Other Databases(ODBC) connector dialog box, select the MySQL ODBC Unicode driver in the drop-down menu. 
  5. Click Connect and enter the connection details. 
  6. Click Details >> and select the SSL tab. 
  7. Click on ... next to SSL Key, SSL Certificate and SSL Certificate Authority to select the client-key.pem, client-cert.pem and server-ca.pem files respectively, and then click OK.
 
 

Cause

The error may be caused by one of the following:
  1. The database password contains special characters.
  2. The password is incorrect.
  3. SSL is required by the Google Cloud SQL instance, but SSL is not configured for the connection in Tableau Desktop.
Did this article resolve the issue?