But every time I try to do an external query to my MySQL database on Google cloud, from Big Query, I receive the following error: Invalid table-valued function EXTERNAL_QUERY Failed to connect to MySQL database. Error: MysqlErrorCode(1045): Access denied for user ‘xxxxx’@‘cloudsqlproxy~’ (using password: YES) at [1:15]
Originally, after creating a new connection via the UI with the correct credentials and querying would work, but after editing the connection and querying, the error message that you reported would be seen.
There are a few workarounds that can be attempted, as follows:
Q1 - Can you please edit the connection [1] via the UI, re-entering the correct credentials and retest?
Q2 - If this doesn’t work, then perform the same actions via the BQ command line.
Q3 - If that still doesn’t work, then create a new connection, including the correct location and credentials and retest.
And please advise of the status, as I will also relay this information to the appropriate product engineering team, depending on the outcome.
Thank you for your answer. I tried the steps above, but it didn’t work.
I keep receiving the message:
“Invalid table-valued function EXTERNAL_QUERY Failed to connect to MySQL database. Error: MysqlErrorCode(1045): Access denied for user ‘xxx’@‘cloudsqlproxy~’ (using password: YES) at [1:15]”
I was never able to connect the BigQuery to MySQL database. I can only connect to this database throw external applications.
Do you think it can be a problem related to the CloudSQLProxy?