Access Google Cloud SQL from SDK Shell - sql

I have created a PostgreSQL Instance in Google Cloud.
I can access the Instance and perform SQL actions using the Cloud Shell.
When i try to access the same from my local using the 'Google Cloud SDK Shell', it fails to connect to the instance,
C:\Program Files (x86)\Google\Cloud SDK>gcloud sql connect [my-instance] --user==user-name
Whitelisting your IP for incoming connection for 5 minutes...done.
ERROR: (gcloud.sql.connect) Could not whitelist client IP. Server did not reply with the whitelisted IP.
I have replaced my-instance and user-name with correct entries
Can someone guide me on how to access this database from my local SDK shell and not using the Cloud shell ?

There are some options to connect to your SQL instance depending on the client that you use, some of them are: Compute Engine, App Engine, mysql client, External applications.
I think your machine could be considered an external application, so you have to follow this guide to authorize your Windows client machine. However, the recommended way is using the cloudsqlproxy since it will free you from whitelisting all connections.
Hope it help you!

Related

How do I connect to a SQL instance running on Google Cloud from NodeJS?

I have currently deployed a NodeJS application on a Kubernetes engine, and I want to send SQL queries to the SQL instance on Google Cloud. What's the best approach to doing this?
Following the official Cloud SQL Connecting from Kubernetes Engine . The recommended procedure to connect to the SQL instance is by using the Cloud SQL Auth Proxy,it will be added to your pod using the sidecar container pattern. This setup has multiple advantages in terms of security and resilience.
But take into account that it's possible to connect to the SQL Instance without Cloud SQL Auth Proxy by using private IP, but only when it belongs to the same VPC network.

How to connect SQL server beta (Google Cloud) to Google API engine (Node.js)

I have a node.js API that is using SQL server beta from Google Cloud SQL. Works fine when testing locally and connecting directly via IP.
I deployed the API on Google APP Engine and works fine less the connection to the database. Now, what will be the server connection string to connect directly from the project API to Google cloud - SQL server beta. How I can make use of instance connection name? (Note: Cloud SQL Admin API is enabled for this project)
I found many examples to connect for mySQL instances, but none to an SQL beta.
How to connect SQL server beta (Google Cloud) to Google API engine (Node.js) ?
As Eugen point out, Cloud SQL instance that are using SQL server are still in beta and therefore, many features are not yet available.
As stated here there's still no option to connect to a Cloud SQL SQL server instance from App Engine. Neither it seems to exist options to connect from external application such as Kubernetes or Compute Engine, as seen here.
Nonetheless, you could try to connect to your SQL server instance by using the Cloud SQL proxy to do local testing, as shown here.
Then, you could try to use some node.js library that can act as a node.js library, as this one for example, but I can not confirm that I will work within App Engine.
Nonetheless, if you have the option, I highly recommend you to use Cloud SQL instance using MySQL or PostgreSQL since they support connection from App Engine apps, as seen here.
I hope this helps.

New Linked Service (Azure SQL Database) Test connection failed

I'm creating New Linked Service that would allow connecting to PaaS DB but the Test Connection is failing. Things I've checked are:
-Firewall on Logical VM for PaaS DB(Relevant IP are in place)
-Connect to PaaS DB via SSMS(It Works)
-Typos
I've used AutoResolveIntegrationRuntime since DB is in the same RG as the Azure DataFactory. Google didn't help much.
Regards
PS: More info can be provided if needed.
Firstly, make sure you have opened the "Allow access to Azure Service" in firewall setting.
What's your PSSA DB, single database or managed instance?
For single database:
The important thing you need to know that:
For managed instance:
To use copy data from an Azure SQL Database Managed Instance that's located in a virtual network, set up a self-hosted integration runtime that can access the database. For more information, see Self-hosted integration runtime.
If you provision your self-hosted integration runtime in the same virtual network as your managed instance, make sure that your integration runtime machine is in a different subnet than your managed instance. If you provision your self-hosted integration runtime in a different virtual network than your managed instance, you can use either a virtual network peering or virtual network to virtual network connection. For more information, see Connect your application to Azure SQL Database Managed Instance.
Here an tutorial can helps you: Azure SQL Managed Instances and Azure Data Factory: a walk-through.
Hope this helps.

How to authenticate users in a commercial environment without on-premises Windows Server equipment?

So what I need is a remote/cloud Windows Server that I can connect to using RDP (or another remote connection program) where I can create users, groups, basically everything I could do with an on-premises Server instance. What I need though is to be able to setup all the office computers to authenticate through the cloud AD. I have no clue how to do this. I cannot have a Server running on-premises, period. Just need something where I can connect each computer to the remote domain/forest, hopefully using an IP to the server, and then have the employees be able to logon to any domain-connected PC using their credentials. Thank you for any and all answers! -Scott
You need Azure Active Directory. You can control everything with remote management in the way you have described. Per the provided link, "Azure Active Directory (Azure AD) provides an easy way for businesses to manage identity and access, both in the cloud and on-premises."

Azure WebApp - Test Hybrid Connection from Kudu Console

I have an Azure web app that has some Hybrid Connections setup. I'd like to be able to prove they are working from the KuDu cmd interface.
Unfortunately telnet is not installed as part of the Azure WebApp OS (Win Server 2012) and I seem to have limited permissions.
Can anyone help?
Specifically I want to make sure I can relay to an email server, so telnetting to the port would be very useful.
Kind regards
Si
Can you try tcpping instead? tcpping is installed and available for use from the Kudu console.