Hello 👋
I have gone throw the following tutorials:
https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries
https://www.youtube.com/watch?v=0cyTHbkARwY&ab_channel=GoogleCloudTech
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]
Does anybody had a similar issue?
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 patience, and cooperation.
Hi comaro
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?
Thank you for you time 🙂
Hi, Noesis,
Could you check and let us know if the issue still persists? If so, please share timestamps of some (as many possible) recent occurrences.
Thanks! I will be waiting for your response.
Hi, I am encountering the same issue and it is failing intermittently. See the below screenshot. All in the Singapore timezone (GMT+8)
Hi, dexterc,
What is the location of your instances?
asia-southeast1
Was anyone able to find the fix for this bug? I cant connect to MySQL on SQL Cloud through BigQuery.. Same error