Remote database access

layla

Member
Joined
Apr 26, 2005
Messages
21
Programming Experience
Beginner
Hi all,

I have a mysql database stored in an FTP site. Currently I am able to connect to this database bacause it is on my pc and I have a connection string hardcoded in my code in vb.net, that looks like this:

Dim DBname As New OdbcConnection("DRIVER={MySQL ODBC 3.51 Driver};" &

"SERVER=localhost;" & _

"DATABASE=DBname;" & _

"UID=me;" & _

"PASSWORD=*****;" & _

"OPTION=3;")

I have a form in which:

userid is written in textbox1
password is written in textbox2

How do I set up this connection to look at the database in the ftp site and use the username and password from the textboxes on the form??

Going mad!

Thankyou in advance


This must be very simple, surely?
 

TechGnome

Well-known member
Joined
May 23, 2005
Messages
896
Programming Experience
10+
Well, it might be, or it might not be. If the remote server has MySQL running on it, and the database has been properly created and attached to the server (simply having it in an FTP folder isn't enough).... AND the host has allowed remote access to the database, then it's a simple matter of using the IP or some kind of web address that points to the server (instead of localhost).


-tg
 

layla

Member
Joined
Apr 26, 2005
Messages
21
Programming Experience
Beginner
Connection

I replaced the server 'Localhost' with the IP address of the computer that stores the database. How do you connect the database to the ftp? I simply have the database on the ftp site, why is this not enough?

with replacing localhost with the IP address I currently get the error: 'ODBC' can't connect to mysql (IP address) server (10065)

Thankyou in advance
 

TechGnome

Well-known member
Joined
May 23, 2005
Messages
896
Programming Experience
10+
Because the SERVER needs to be running the MySQL Services. It's not like Access which is simply afile and is self contained. The engine which allows connectivity must also be running, and in addition, the engine must be made aware of the database as well.

At this point, you may want to contast your web host to see if mySQL is even possible, and if it is, find out how to access it.

-tg
 
Top Bottom