Slow connection to Google Cloud Sql from external server - google-cloud-sql

I have successfully deployed Google Cloud SQL with phpmyadmin running on App Engine. When connecting the database directly using App Engine the performance is fine but while connecting it via sql client or external server it takes too long to load.
Can anyone tell me what might be the reason for this behavior?

Related

QlikSense connection to localhost application using REST

Trying to establish a data connection using REST from QlikCloud account to a locally running application. I get an errror:
Connection to local resources is not allowed
The application running on my laptop is having a REST API enabled.
I was not able to use QlikSense Desktop so I had to login through the browser to QlikCloud.
I also tried giving the ipaddress of my laptop instead of localhost. It still throws as error:
Connection to http://<ip_address>:1000/v1/documents?uri=/csv/myFile.csv is not allowed
Should I be running my application only on a server? Any help is appreciated.
The data connections are "executed" in the context of the Qlik Engine. Which means that when specifying localhost the connection will try and load the data from the machine where the Engine is running. In Qlik Cloud case - this will be some machine in Qlik's cloud.
You can:
use QS Desktop (you've mentioned that this is not working for you)
host your service somewhere on the interned where the Engine can reach it
use some service (like ngrok) that can tunnel the local server to a public url which then access from Qlik

Connect Cloud Run to Cloud SQL Server Instance in C#

If I understand the "Cloud SQL Connections" tab in Cloud Run should instantiate the Cloud SQL Proxy.
What is the sql server connectionstring that I should use to make this work?
Setup : (All in the the same GCP Project):
1. Create a Cloud Sql instance of SQL Server
2. Upload your docker image to Google Container registry.
Written using .netcore with code to connect to the SQL Server created in step 1
2. Create a Service instance in Google Cloud Run.
3. Specify Cloud SQL Connections and select your sql server instance from the list and deploy.
I've not tried this using Cloud Run and SQL Server but ...
The proxy should make a connection available to your .NET client on 127.0.0.1:1443 (link)
Assuming you're using a database client similar to the Google example, your connection string will be:
"ConnectionString": "User Id=[[USER]];Password=[[PASS]];Server=127.0.0.1;Database=[[DB]];"
If I understand correctly, the default port is 1443.
NB Per other commenters, your question would be improved with more details. When you write that you're completing steps, please include the links. When you reference your configuration, please include snippets. Folks answering your questions benefit from having to assume as little as information as possible from questions.
I do not think it is supported yet. There is no documentation for Cloud SQL Server.
According to the official documentation :
Once correctly configured, you can connect your service to your Cloud
SQL instance's unix domain socket using the format:
/cloudsql/INSTANCE_CONNECTION_NAME.
Note: Cloud Run (fully managed) does not support connecting to the
Cloud SQL instance using TCP. Your code should not try to access the
instance using an IP address such as 127.0.0.1 or 172.17.0.1.
Also:
Note: The Cloud SQL Proxy does not support Unix sockets on Windows.
I tried to do it using Cloud SQL Proxy with tcp and got:
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused 127.0.0.1:1433

Cannot connect to on-prem SQL Server with Google Cloud Data Fusion

I am trying to test a connection using Cloud Data Fusion to connect to an on-prem SQL Server. Our GCP Project does not use the default network but rather a custom VPC.
It's important to note that security is very important as this database contains healthcare data.
We currently have App Engine Flex code that uses pymssql to query the database on this SQL Server through the VPC, and want to test using Data Fusion.
I have copied and added the generated data fusion service account to IAM with role Cloud Data Fusion API Service Agent.
I have configured in Data Fusion
system.profile.properties.network = <VPC name>
I have verified that the username and password for authentication to SQL Server are valid for the database.
THE VPC network allows port 22 and 1433.
At this point I am just trying to get a successful connection to query a table in the database.
Here is the error message I get:
Connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.
Thoughts?
It looks like you can access SQL Server from GCP (via AppEngine Flex Py code) but having trouble connecting through Data Fusion. It also looks like authentication doesnt seem to be a problem (as the error message is around connection).
One area I can think of is to try Cloud Data Fusion private IP, that allows you to securely connect to your VPC from Cloud Data Fusion. This is a new feature and you will need Data Fusion product team support to leverage this feature.

Unable to access Google Cloud SQL (old) console

As of today, I can no longer access the Google Cloud SQL web console. For as long as we've been using Google Cloud SQL (about a year now) we've always been able to open the old google API console to get to the SQL prompt, but today the "noredirect" link stopped working and it always redirects to the new Google developers console which has no way to run SQL against the database. The URL we are using is like this:
https://code.google.com/apis/console/b/2/?noredirect&pli=1#project:999999999999:sql:instance:myprojectid:db01
Any ideas why this stopped working, and any alternatives for an SQL web interface? I would prefer to not have to setup a static IP and connect from a MySQL client.
Thanks.
This service has been turned down. There are several alternatives:
1) You can use the new "gcloud beta sql connect" command that is included in the Cloud SDK. Unless you machine supports IPv6 (unlikely) you will need to enable a IPv4 address for your instance.
2) You can connect using the normal mysql client. Again, unless you machine support IPv6 (unlikely) you will need to enable a IPv4 address for your instance. You will also need to authorize your IP address.
3) You can deploy PHPMyAdmin on Google App Engine which will provide you with a web console.

Google Cloud SQL connection is very slow

We are using google cloud sql instace with our project and we are using Squirrel and Toad as admin tools for our instance.
In the recent days our instace performance is very slow. Connecting our cloud sql instace with the admin tool itself very slow.
In some times it not even establishes the connection with the admin tool for around 2 mins. After that only the connection get established.
We also checked with other internet connection also. In that also the performance is too low.
Can you plese check the performance of the google cloud sql.