I have remote machine with ip 192.X.X.X and am connecting it using putty(SSH) after login i was connecting to mysql using local host 127.0.0.1 and its working fine.
I was also able to mysql using mysql work bench using the option standard tcp/ip over SSH
currently am using SSIS 2012 is there any way we can connect to this mysql(which is in remote machine) using any connector..I tried oledb and odbc but not able to connect
Can any one help me on this...
Thanks in advance...
Here is how to connect to a mysql database (on a different server) for use with an SSIS 2012 package using an SSH session.
First, install the mysql drivers if not already. They can be found here:
mysql official drivers
Set up your SSH session.
Set up port forwarding. Either do a remote forward (Set local_port: 3306, remote_host: yourmysqlservername_or_ip, remote_port: 3306 ) or a local forward (Set port: 3306, host: localhost, remote port: 3306).
Log in to your server with the SSH session you just created.
The preceding 3 steps taken from this link about using SSH with mySQL
Next, you will set up a data source (system DSN) from within the ODBC data source administrator (Installed along with the drivers hopefully, example shown in the following link). This data source is what will then show up in your Connection manager list in SSIS. During this setup, you will put in 'localhost' as the server name rather than the actual server name, since you are using an SSH session and port forwarding.
Example DSN sestup
Finally, when you create a new connection in your SSIS package, choose an odbc connection and the data source name you just set up should show up in the list of data source names.
Related
I am working on database project, my database is on hostinger. I want to connect mysql workbench to hostinger.
can please someone guide me how to do this.
In cpanel:
Add remote IP Address to Remote MySQL
In Operating System: ODBC and MySQL Workbench
Close MySQL Workbench
Download and Install 32-bit or 64-bit MySQL ODBC connector from MySQL website
Restart PC
Configure ODBC (Windows run Win+R: %windir%\System32\odbcad32.exe )
Add source and choose: MySQL ODBC 5.3 Unicode Driver
Choose Data Source Name
TCP/IP Server: mysql.hostinger.[top-level domain] (e.g. mysql.hostinger.nl or mysql.hostinger.in)
!!! or Public IP address if it's given in cpanel at Remote MySQL on top of the page.
Port: 3306
Fill in: User and Password
Test connection
Start MySQL Workbench
Fill in same data as ODBC connection and test connection.
First SQL command have to be: USE [database name] ;
show tables;
Go to your hpanel
Select your website hosting click Manage
Go to Bottom page Under Database's click Remote MySQL
Check Any Host and Select your Database cick Create
Copy the hostname(which is something like sqlxxx.main-hosting.xx or IP 19x.xxx.xx.xx) located on top of IPv type Field
Goto workbench:
Create New Connection
Connection Method Standard(TCP/IP)
Under Parameters tab Hostname Field Enter Copied Hostname(sqlxxx.main-hosting.xx or IP 19x.xxx.xx.xx)
Port Field Enter:3306
Enter the Username & Password credentials when you created your database in Hostinger
We have a Linux Vm which is running our OTRS. I have found the kernel file which has the database configuration details. In there the host name is listed as local host.
I tried using the server IP address along with the database username that is there; however I cannot seem to connect.
I also cannot find the port that is utilized. How do I connect to the database on mysqlworkbench,
Maybe server doesn't allow remote connections to the DB or user used by OTRS is only a local user?
If this is true you've got two options:
Create user that is allowed to login remotelyCreate user that is allowed to login remotely
Create user that is allowed to login remotely
Use Standart (TCP/IP) over SSH as connection method in MySQL workbench. This option allows to first connect over SSH to the server and than connect to the DB as local user
I'm trying to setup a new connection in MySQL Workbench to MySQL server on my other network computer named say: SERVER
Hostname: SERVER
Port:3306
Username and password I leave blank.
I'm getting "unknown server host"
SERVER has dynamic IP.
How do I provide the correct Hostname?
I don't think that you can connect to a computer of your network with its name only in MySQL Workbench.
So, if you can't allocate a fixed IP with DHCP to your computer running MySQL maybe you could use port forwarding in your router config (localhost:port -> computer2_ip:mysql_port) so you will be able to connect to localhost:port in MySQL Workbench. You could also create a tunnel between the two computer but I think this is rather a question for ServerFault.
I have a job which has source connection as oracle on windows.
On Destination it should update a mysql database table on ubuntu linux server over ssh.
Is this possible to do?
In insert/update step is it possible to give connection type over ssh?
In need of help.
Target insert/update step works through JDBC connection. Therefore you need to open port on MySQL DB to be able to connect to DB.
You can open a connection via Putty and use 127.0.0.1 in the jdbc connector to connect to your DB via the tunnel opened by your putty session.
I am setting up CakePHP for the first time in order to develop the server side of the website I'm building. I already have a database set up on a remote server. So I want CakePHP to connect to that server. That's not working. I get a notice "Cake is NOT able to connect to the database."
I've tried changing the settings in cake\app\database.php:
persistent: true or false
host: with or without prefix 'http://'
But none of that helps. All the examples I've seen have server set to 'localhost'.
Can anyone tell me if cakePHP can connect to a remote db? Or am I completely missing the point and should I be using the mysql server included in my WAMP set?
You have 2 options
Option 1
Your webhost needs to allow connections to the mysql instance from outside the local network.
Check the manuals for the webhost if you're allowed to change the mysql configuration yourself you may be allowed to accept incoming connections.
Your method only works when the host accepts incoming connections on for example port 3306 which is the default mysql port.
Option 2
If you have SSH access to the remote host, you're able to set up a tunnel.
Which would make you connect to the Mysql Instance though your SSH connection on a local port.
One way you could do this is by using PuTTY.
How to set up a MySQL tunnel in PuTTY
Initiate the connection and keep it alive.
Use the host 127.0.0.1 and port 3306 in your CakePHP Database config.
Username & Password would be your MySQL User Credentials