Cannot connect to MySQL Database in Workbench - mysql-workbench

It's my first time working with MySQL, so it's not much I know about it. I just installed MySQL Workbench client (no server) and attempted to connect to a MySQL database that exists on a different host.
I tried to connect to an external database and received an error. I used a Standard (TCP/IP) connection, entered an IP address for the other hosting machine, user name and password and clicked Test Connection. The error I am getting: "Failed to connect to MySQL at HostName with User. Unable to connect to localhost."
Why is it connecting to localhost if I entered a totally different IP? I don't have a localhost and I don't need it. Is there anything special that I have to do when I connect to a different server?

Related

Unable to connect Tableau Desktop to remote Mongo Server

I am trying to connect a Tableau desktop to a remote MongoDB server using ODBC connector. I have followed the steps mentioned in this page https://docs.mongodb.com/bi-connector/current/connect/tableau-auth/#std-label-connect-tableau-auth
But I am getting the below error
[MySQL][ODBC 1.4(w) Driver]Can't connect to MySQL server on '13.38.33.197' (64)
Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection.
Unable to connect using the DSN named "test new". Check that the DSN exists and is a valid connection.
Please help me in resolving the issue.
This error occurs when a running mongosqld instance cannot be found. Here are the steps to follow for a successful connection to mongoDB from Tableau desktop.
Install mongoDB connector for BI on your machine.
In command prompt, navigate to mongosqld file location.
Use the below command to provide host and connection details
mongosqld --mongo-uri --auth --mongo-username --mongo-password --mongo-authenticationSource
The above command will create a live connection on localhost.
Create a system DSN with host/server IP as localhost or 127.0.0.1 and the same DB credentials.
On Tableau Desktop, select connect via Other Databases (ODBC).
Select the system DSN created and click on connect.

pgAdmin 4. Unable to connect to server

I had a postgreSQL server/database working in a local area network in Windows. To have access to it through Ethernet I changed the IP in the router settings. Everything was fine. But when I came today to the office, I could not have connected to the server. Moreover, I cannot even create a localhost server on that PC. The error is "Unable to connect to server:" and nothing else. When I turn off the postgres in services it specifies the error with TCP/IP, port, etc. But not when the service is on. When connecting to the server, the pgAdmin asks for the postgres password. Endlessly, thou the password is printed correctly and the METHOD is set to trust. The reinstallation did not help.
What does this error mean? And what is the cure?

DBeaver localhost PostgreSQL connection refused

I just installed DBeaver on my personal computer and am trying to create a PostgreSQL database.
I entered the following in the Connect to database window:
Host: localhost
Port: 5432
Database: postgres
User: postgres
Those values were all pre-filled defaults, so I left them and clicked the Test Connection... button.
When I click the Test button an error window opens, saying, "Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. Connection refused: connect"
I tried setting my own db name and credentials, but get the same results.
How do I set up a local PostgreSQL database in DBeaver?
DBeaver does not allow to setup a local PostgreSQL server or instance: it allows to connect to an existing server or instance. If the PostgreSQL instance does not exist you should install PostgreSQL binaries and create a new database instance with initdb.
If your operating system is Windows 10 Home, you have to use 192.168.99.100 instead of localhost.
Answer from here - https://www.reddit.com/r/dbeaver/comments/fi8h0q/new_dbeaver_install_how_to_set_up_first/.
Dbeaver is just a client to the server. You need to setup the server itself first.
https://www.postgresql.org/
Download and setup the server then you can connect to it with DBeaver and do what you want to do.
I got the same, and then I remembered that I didn't start postgres with the script

PGAdmin III cannot connect AWS RDS

I am trying to connect AWS RDS PostgreSql from PgAdmin 3. I followed the below link
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html
In Security Group, I also added PostgreSQL and All traffic as below
The "publicly accessible" flag was enabled (updated after Mark B's comment)
I got the error from PGAdmin3
Very appreciate for any suggestion
******UPDATE*******
I can connect pgAdminIII to AWS RDS successfully using home wifi, but cannot connect using office wifi.
My concern is:
Was the port 5432 blocked by office wifi?
How can I configure/update the port without impacting to current API?
Note: My current API is working well (CRUD)
Can you can test your connection to a DB instance using common Linux or Windows tools first?
From a Linux or Unix terminal, you can test the connection by typing the following (replace with the endpoint and with the port of your DB instance):
$nc -zv DB-instance-endpoint port
For example, the following shows a sample command and the return value:
$nc -zv postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299
Connection to postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com
8299 port [tcp/vvr-data] succeeded!
Windows users can use Telnet to test the connection to a DB instance. Note that Telnet actions are not supported other than for testing the connection. If a connection is successful, the action returns no message. If a connection is not successful, you receive an error message such as the following:
C:>telnet sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com
8299
Connecting To sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com...Could not
open connection to the host, on port 819: Connect failed
If Telnet actions return success, then you are good to go.
If you are trying to access it from a network which is not listed for that port. you need to add inbound rules for those network IPs from AMAZON RDS system
You will also need to set Public accessibility true under Connect & security tab in RDS console.
Read this post.In your security group go to unbound rules and add my ip.
and make sure your database is public.
https://serverfault.com/questions/656079/unable-to-connect-to-public-postgresql-rds-instance

Can't connect to Google Cloud SQL

I opened a trial account on Google Cloud and I'm having difficulties connection to Cloud SQL.
I made the basic setup, authorizing my IP/32 && adding a new User (appUser).
But I can't open a remote connection to the instance.
mysql -v --host=<ip> --user=appUser --password
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '<ip>' (60)
I'm at work and obviously behind a ton of firewalls and whatnot. Could this be the cause of my problems ?
There is a good change that it is a firewall problem. Error 2003 (from MySQL client manual) means that it can't connect to the server.
Can you try to connect through a computer outside the firewall?