Postgresql ODBC driver configuration - networking

I am trying to connect postgresql server which is running on Linux machine from Windows 7. I have installed windows 64 bit ODBC drivers for postgresql and I changed pg_hba.conf file under IPV4 as 0.0.0.0.0/0 to accept connection from any host. Also, I did make sure that my server is listening on 5432 port to which I am trying to connect. Still I am facing connection failure error. Error is -
"Could not connect to server; A connection attempt failed because the connected party did not properly respond after a period...

Related

Not able to connect GCP windows VM telnet error .Could not open connection to the host, on port 80: Connect failed

I have website hosted on GCP windows VM on IIS and running absolutely fine with internal ip address of the machine. However when trying to access the website with same internal IP through VPN it does not work . Firewall rules have been added to allow 0.0.0.0/0 TCP:80 port.
when I did telnet I received following error "Could not open connection to the host, on port 80: Connect failed" Not sure what I am missing.

How to connect a Server in linux (host) with a client running in QEmu's guest linux (guest)

I want to connect via TCP socket a server app running in the host with a client running in the QEmu guest.
I use port 5104 for the socket in the server.
I start the server.
Then I found that I can not launch the QEmu giving that port as the input point for the client in the guest, like this:
qemu-system-arm ... -net user,hostfwd=tcp:127.0.0.1:5104-:5104
Gives the error "Could not setup host forwarding rule ..."
I guess that qemu acts like a server also and then the port is already taken by the server previously launched and then is not possible to do it.
Which is the correct syntax? The documentation talks about the option guestfwd but I tried all the possibilities and I couldn't found the solution. It should be way to do it.
Any suggestion?

Emulate mysql workbench TCP/IP over SSH in ODBC connector

I set up a remote SSH connection with Putty to a mysql datebase using a socket file and port 5001 (required by the provider). With mysql workbench I use the TCP/IP over SSH connection which works fine. Now I require to setup an ODBC connection using the mysql ODBC connector. Using just the setup with localhost/5001 and the dbuser/dbname results in a error 10061 can not connect to mySQL server.
What I am missing is how to setup this ODBC connection with the SSH parameters host, port and SSH username - similar as this is done in the mysql workbench. Is this at all possible in mysql connector?

Connect to MongoDB via SSH within R

How can I create a SSH tunnel to a machine (RedHat Enterprise Linux) hosting a MongoDB (Version 3) and then run R scripts from my machine (windows) on the database?
I know how to connect to the machine via puTTY and then run an uploaded FCP transferred R script from the shell on the machine, however I want to perform the analysis from my PC so I can test my scripts quickly and export analyses and results easily.
This is adapted from an instruction I have for our remote MySQL SSH connections. The remote database server is configured to listen to its local address on port 27017. (127.0.0.1:27017). You would want to replace 10.10.10.10 with the IP address of the MongoDB server.
1. Install putty.exe
2. Start putty.
3. Sessions Tab:
3a. Set hostname like:
3b. <username#hostname>
3c. Eg: mongo_user#mongodb.server.com
4. Connection : SSH : Tunnels tab.
4a. Source port: 27017
4b. Destination: 10.10.10.10:27017
5. Sessions Tab
5a. Saved Session: Type name such as “MongoDB Server”
5b. Select [Save] button
On your windows client, you would use a connection string to connect to 127.0.0.1:27017 (the local source port you configured in the putty connection above)
edit to change 192.168.0.1 to 127.0.0.1 (wrong local/loopback address)

connecting to sequel pro database remote server via RMySQL

I'm running Sequel Pro 0.9.9.1 and can connect to a remote mySQL (v 14.14) database hosted on a server that only allows SSH connections. When I connect via Sequel Pro, I only need to fill out the ssh user and password to connect without issue. I am able to access all databases in this manner.
I then try to connect to the database in R (2.14.0) using RMySQL (0.9-3), but this command fails:
conn <- dbConnect(MySQL(), user="ssh_user", password="ssh_password", host="localhost")
with the error: "RS-DBI driver: (Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" regardless of if I use single quotes (suggested elsewhere), change the user and/or password to "root" or "", or substitute "127.0.0.1" for "localhost". If I substitute the server host for host in the R command, I am told I cannot access the server (which is true, it is configured to only be accessed via ssh).
What are the correct user, password and host to use to connect to a database accessed via ssh through Sequel Pro in this manner?
I've never done this, but I assume you could use SSH to tunnel the appropriate port, as discussed here: http://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/ .
In brief, you would:
Tunnel the appropriate port through SSH, which by default would be
3306 for MySQL.
Use dbConnect() to connect to the MySQL server as
if it was on your local machine.
This bypasses the need for Sequel Pro. The tunnel essentially allows traffic on your local 3306 port to be tunneled through an SSH connection on port 22 between your local machine and the server and then forwarded to port 3306 locally on the server.

Resources