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?
Related
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)
I want attach my local MS SQL db to www.godaddy.in server can anyone suggest me how i can attach my db. Or how i can connect my sql server 2008 studio management to www.godaddy.in server. when i'm trying to connect my sql server studio management to www.godaddy.in server it's not connect showing Error
(Provider: Named Pipes Provider, error:40, and microsoft sql server error 53)
https://social.technet.microsoft.com/wiki/contents/articles/2102.how-to-troubleshoot-connecting-to-the-sql-server-database-engine.aspx
http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
https://stackoverflow.com/questions/11278114/enable-remote-connections-for-sql-server-express-2012
Short Answer
Check Firewall
Check Service is Running
Check TCP/IP is Enabled
Check SQL Server Properties "Allow Remote Connections"
Then Run these if Those Do not Resolve
Right-click on TCP/IP and select Properties.
Verify that, under IP2, the IP Address is set to the computer's IP address on the local subnet.
Scroll down to IPAll.
Make sure that TCP Dynamic Ports is blank.
Make sure that TCP Port is set to 1433.
If you have a named instance then you must have the SQL Server Browser Service enabled
The browser service runs on port UDP 1434 and this must be allowed through your firewall
Hail Mary Pass if this is Still not Resolved
Go to the client machine, and run cliconfg.exe If named pipes is listed first, demote it, and promote TCP/IP.
check if the firewall is blocking the named pipes port, which usually is 445
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.
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...
I'm trying to connect from my ms windows 7 via the odbc administrator to a remote
sybase sqlanywhere 11 database server.
But I get not connection, I'm not sure which configure option I have to specify.
server-name = ip address of remote database server?
startline ?
portnummer ?
Thank you, best regards, Alex
By default the SQL Anywhere server process dbsrv#.exe listens for incoming connections on port 2638.
Make sure your firewall allows outbound connections to that port.
Assuming you have a database running on your server as follows:
-x tcpip
-n my_server_name
"[DIR]\database_main_file.db" -n my_database_name
The server will broadcast on the tcp/ip layer on the default port (2638) under the name "my_server_name" and the database will be accessible under the name "my_database_name" via ODBC
Creating an ODBC entry for your new database to connect from a client (adjust for Windows 7)
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\myodbcentry]
"Driver"="C:\\PROGRA~1\\SQLANY~1\\Bin32\\dbodbc11.dll"
"DatabaseName"="my_database_name"
"ServerName"="my_server_name"
"LINKS"="TCPIP(IP=SERVER_IP_ADDRESS;PORT=2638)"
There are other parameters available for LINKS (HOST, etc). Take a look at http://dcx.sybase.com/index.html#1101en/dbadmin_en11/da-using-tcpip.html
I've seen some rare issues with UDP broadcast packets. See the docs at
http://dcx.sybase.com/1101en/dbadmin_en11/broadcastlistener-connection-conparm.html and check with your network administrator.
You can also use the dbping.exe utility to troubleshoot networking issues.
BTW, you may want to cross-post your question at http://sqla.stackexchange.com. It's full of SQL Anywhere buffs