Unable to access database from Google Cloud MySql account using Microsoft Visual Studio C#

JC 1 Reputation point

I have been trying to access a MySQL database I created in Google Cloud for creating an Android app using C# in MS Visual Studio. It neither retrieves (or adds to) any of my data from my Google cloud MySQL database nor does it return any errors or suggestions to improve my connection string statement.

The connection string format in my code is as below:

public static string connectionString = "server=name of my server;port=port number;user=user name;password=password;database=name of database;";

Is the above syntax correct, or am I missing anything? Also, is it connection name or is it public IP address I use for server name?

Thanks in advance for your help.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,128 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Seeya Xi-MSFT 15,191 Reputation points Microsoft Vendor

    Hi @JC ,

    Welcome to Microsoft Q&A!

    Your problem does not seem to be related to sql server, but rather more seems to be related to Google Cloud.
    I tried to solve your problem and here are the links that I think might help you.

    Also, is it connection name or is it public IP address I use for server name?

    Server = "Google Cloud SQL IP address"

    Here is the Google Cloud Support i find from google:

    Best regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.