Shady Level: VB Guru

 Registered: 08-07-2002 Posts: 305
|
Re: conecting to local db and internet
Hi there,
I have created an application that connects to a MYSQL database on our local network. This should be the same process for a database on the internet.
As MYSQL allows access through port 3306 by default you should ensure the internet database allows connections through any firewall, you also need to ensure that the user name you are using to connect to the databse has the correct permissions to access the databases you wish to write to. You may need to create a new user id as the root id may be restriced to the andreavb.ipowermysql.com.
In order to connect to the MYSQL database you need to create a DSN (Data Source Name), this can be done in the Control Panel through Administrative Tools. Once you have created the DSN, you should be able to connect VB to the database via an ADO control.
When creating the DSN, you should select the MYSQL driver, then when you click add, a MYSQL form will appear requesting certain information including the IP address of the server running the database and the port you wish to connect on, also you should enter the new user id and password in there.
I have not actually tried this method to connect to a database on the internet, but the principle is exactly the same, you just have to make sure that the permissions and firewall rules are stup to allow access.
Hope this helps
____________________________
I don't wanna die... but I ain't keen on livin' either
|