PDA

View Full Version : connect to mysql database


craigrs
03-09-2010, 08:37 PM
How can I use asp.netto connect to a mysql database? All the descriptions that I have seen so far start with installing mysql on my pc, and then installing an odbc conenction.

What I woud like to do is have a web page connect to a mysql database on a web server. I would rathner not require web users to install odbc connections.

How can I have an asp.net web page connect to a remote mysql database? Is there a standard way to do this? Is there any particular software that the web serever or database server needs to have installed in order to do this?

Thanks.

JGRobinson
03-11-2010, 11:09 PM
Hi,

If your users are accessing a web page which is running on a web server only the web server would have any database software (such as odbc) installed.

Any clients would just require a browser.

Hope this helps
Graham

Shauny_B
03-12-2010, 09:21 AM
Hello,
You'll need to reference a MySQL class library which are available freely on the internet. Just simply google for MySQL libraries for the .Net framework.

It'll be like how you use the SqlConnection... But be like MySqlConnection...

Hope this helps,
Shaun