954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How To Connect Remote Mysql Database

Hello everybody ,

Im created an Application in vb6.0 . In that application i have to store data in a web Mysql database.How can i connect tht

murali1
Newbie Poster
1 post since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

Hi,

Assuming you have experience with ADO, you should download and install MySQL Connector , and then, use a connection string like:

Driver={MySQL ODBC 3.51 Driver};              
Database=<strong><em>database_name</em></strong>;                                                
Server=<strong><em>server_address</em></strong>;
Port=<strong><em>server_port</em></strong>;
Option=19;
Stmt=;
Uid=<strong><em>username</em></strong>;
Pwd=<strong><em>password</em></strong>


server_address can be also a name.
server_port will be 3306 most of time.

Hope this helps.

Alvein
Junior Poster
104 posts since Jul 2005
Reputation Points: 12
Solved Threads: 4
 
Hello everybody , Im created an Application in vb6.0 . In that application i have to store data in a web Mysql database.How can i connect tht


I'm the same murali , but my application write by java. It can only connect in local mysql, but doesn't connect in internet mysql.

Except you to help me.

duongkhangth2
Newbie Poster
3 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 
Hello everybody , Im created an Application in vb6.0 . In that application i have to store data in a web Mysql database.How can i connect tht

pls anybody have the ans
i m with same problem here

ajaym83
Newbie Poster
1 post since Jun 2008
Reputation Points: 10
Solved Threads: 0
 
pls anybody have the ans i m with same problem here


Create a named entry for the database server use control panel->administrive tools->data source .

ithelp
Nearly a Posting Maven
Banned
2,230 posts since May 2006
Reputation Points: 769
Solved Threads: 128
 

Are you able to connect to theweb database from your system ?

Please find connection details here .

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

To connect to a MySQL server on a remote system:

mysql -h hostname -u root -p root

here hostname is (ex:192.168.20.27 for remote system)
"root " is the username.
-p is password you should provide.(Ex""root")

murali789
Newbie Poster
1 post since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

Connecting to mysql server as root should be discouraged .

ithelp
Nearly a Posting Maven
Banned
2,230 posts since May 2006
Reputation Points: 769
Solved Threads: 128
 

Murali, did you solve the problem?

Baradaran
Junior Poster in Training
88 posts since Feb 2007
Reputation Points: 11
Solved Threads: 7
 

This code a couple of minor bugs with string line continuations, but those are easy enough to fix:

http://www.base64.co.uk/mysql-odbc-driver/

1. Follow the link for the MySQL ODBC Driver and install it (if you haven't already).

2. Be sure to select the Microsoft Remote Data Object 2.0 in your project References.

3. Add your internet service provider as a Remote Database Access host through your control panel (i.e. %.fios.verizon.net).

The first time you attempt to make a connection, the MySQL ODBC Driver install will prompt you to confirm the connection with a pop-up window. It should not come up again.

I had to use my Control Panel User ID and Password to make this work. Virtual ID's did not work (i.e. MyAccountLogin_MyPHPUserID). The only virtual reference that did work was for the actual database itself (i.e. MyAccountLogin_MyDatabaseName).

The only thing left out of this sample is how to pull data fields from the result set. The comments suggest "reference it like !username", but I prefer using something like this:

strName = .rdoColumns.Item("Name")

Lastly, case matters for the table names in your SQL statements. If you have a table named "Products" in your database and you issue a query for a table named "products", it will bomb.

Everything after that should be relatively easy to figure out.

Hope this helps!

TokyoMokyo
Newbie Poster
1 post since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You