How to Connect to a remote MySQL database

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

How to Connect to a remote MySQL database

Postby tweetie » Mon Apr 12, 2004 2:50 pm

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:

Supposed the location is mysql.hosting.com
and the databasename is IDA

What am I supposed to fill as database server URL??
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby automazione » Mon Apr 12, 2004 5:11 pm

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
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby swingman » Tue Apr 13, 2004 6:52 pm

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.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Postby tweetie » Wed Apr 14, 2004 2:11 pm

Code: Select all
jdbc:mysql://mysql.hosting.com/IDA

Tried that...couldn't connect

Code: Select all
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:
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby automazione » Wed Apr 14, 2004 2:51 pm

Code: Select all
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
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby tweetie » Thu Apr 15, 2004 2:10 pm

Well this should be funny.....
The ISP recently removed remote access to MySQL...without informing their clients.....
No wonder it doesn't work :evil:
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby Jan Aleman » Fri Apr 16, 2004 1:42 am

do they still allow you to ssh to their server? In that case you could use an ssh tunnel.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth


Return to How To

Who is online

Users browsing this forum: No registered users and 2 guests

cron