How to Connect to a remote MySQL database

I want to connect to a MYSQL database which is hosted by an ISP…
I tried just about everything but I can’t seem to connect.
I tried:
jdbc:mysql://http://mysql.hosting.com/IDA
jdbc:mysql://mysql.hosting.com/IDA
http://mysql.hosting.com/IDA
mysql.hosting.com/IDA
Supposed the location is mysql.hosting.com
and the databasename is IDA

What am I supposed to fill as database server URL??

defer.jar (7.5 KB)

I have a couple of mysql connected with:

jdbc:mysql://mysql.hosting.com/IDA

But when I first tryed to connect them had some problems with security settings.

Have you tried accessing mysql using the user name and password directly, outside of jdbc-Servoy?

Example: (from mysql base directory)

bin/mysql --host=mysql.hosting.com --user={username} -p IDA

If you can access mysql in that manner, then you should be able to access through jdbc-Servoy

We are using several remote mySql databases here.

Some ISPs will not allow you to connect remotely to mySQL for security reasons.

With our ISP I have to go to a control panel and add the IP address of the computer accessing the mySQL database to a list of ‘friendly’ hosts to get the connection working.

jdbc:mysql://mysql.hosting.com/IDA 

Tried that…couldn’t connect

bin/mysql --host=mysql.hosting.com --user={username} -p IDA 

I don’t have access directly to the dirs on my ISP

Some ISPs will not allow you to connect remotely to mySQL for security reasons.

I can connect with Filemaker… :shock:

bin/mysql --host=mysql.hosting.com --user={username} -p IDA 

Install a copy of the mysql program on your PC, then from here using the mysql.exe program (usually located on the bin folder of your mysql installation) try to access your database on the ISP, if fails to connect probably is because the ISP must add add you in their mysql “friends” table, or need to open port 3306 for you.

hope this help

my_sample_solution.servoy (12.2 KB)

Well this should be funny…
The ISP recently removed remote access to MySQL…without informing their clients…
No wonder it doesn’t work :evil:

do they still allow you to ssh to their server? In that case you could use an ssh tunnel.