944,161 Members | Top Members by Rank

Ad:
Sep 20th, 2005
0

How To Connect Remote Mysql Database

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
murali1 is offline Offline
1 posts
since Sep 2005
Sep 21st, 2005
0

Re: How To Connect Remote Mysql Database

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=database_name;                                                
Server=server_address;
Port=server_port;
Option=19;
Stmt=;
Uid=username;
Pwd=password

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

Hope this helps.
Last edited by Alvein; Sep 21st, 2005 at 12:16 am. Reason: Fix formatting
Reputation Points: 12
Solved Threads: 4
Junior Poster
Alvein is offline Offline
104 posts
since Jul 2005
Apr 10th, 2008
0

Re: How To Connect Remote Mysql Database

Click to Expand / Collapse  Quote originally posted by murali1 ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
duongkhangth2 is offline Offline
3 posts
since Apr 2008
Jun 12th, 2008
0

Re: How To Connect Remote Mysql Database

Click to Expand / Collapse  Quote originally posted by murali1 ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ajaym83 is offline Offline
1 posts
since Jun 2008
Jun 13th, 2008
0

Re: How To Connect Remote Mysql Database

Click to Expand / Collapse  Quote originally posted by ajaym83 ...
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 .
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006
Jun 13th, 2008
0

Re: How To Connect Remote Mysql Database

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

Please find connection details here.
Last edited by debasisdas; Jun 13th, 2008 at 5:34 am.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Jun 27th, 2008
0

Re: How To Connect Remote Mysql Database

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")
Reputation Points: 10
Solved Threads: 0
Newbie Poster
murali789 is offline Offline
1 posts
since Jun 2008
Jun 29th, 2008
0

Re: How To Connect Remote Mysql Database

Connecting to mysql server as root should be discouraged .
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006
Jun 29th, 2008
0

Re: How To Connect Remote Mysql Database

Murali, did you solve the problem?
Reputation Points: 11
Solved Threads: 7
Junior Poster in Training
Baradaran is offline Offline
88 posts
since Feb 2007
Jun 29th, 2008
0

Re: How To Connect Remote Mysql Database

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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TokyoMokyo is offline Offline
1 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Advice on VB6 and Access 2000, please.
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to create Setup/install





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC