As I followed all the steps you have said but I am still getting this error.
i am using Public IP, i have given access to in IAM also.
Invalid table-valued function EXTERNAL_QUERY Failed to connect to MySQL database. Error: MysqlErrorCode(2013): Lost connection to MySQL server during query at [1:15]
Thanks
This error message usually indicates that BigQuery is unable to maintain a connection to your Cloud SQL MySQL instance.
Things to check:
EXTERNAL_QUERY
function is using the correct connection settings, including the public IP address, port number, and database name of your Cloud SQL MySQL instance.EXTERNAL_QUERY
function is using the correct authentication method, either SQL client certificate or MySQL password authentication.Additional troubleshooting steps:
If you have tried all of the above and you are still getting the error, you can contact Google Cloud support for assistance.
Notes:
EXTERNAL_QUERY
function does not use a connection string to connect to Cloud SQL.