Yes it is - but I had loads of problems myself!
The solution:
Copy both mysql.Data.dll and mysql.web.dll to the bin directory, i didn't have to add any references, it just worked.
Code:
using MySql.Data.MySqlClient;
...
strConnect = ConfigurationManager.ConnectionStrings["LoginDatabase"].ConnectionString;
sqlCmd.Connection = newMySqlConnection(strConnect);
sqlCmd.Connection.Open();
reader = sqlCmd.ExecuteReader();
reader.Read();
...use reader["fieldname"]
sqlCmd.Connection.Close();
In your ONLINE web.config:
Code:
<?xml version="1.0" ?>
<configuration>
<appSettings />
<connectionStrings>
<add name="LoginDatabase"
connectionString="server=mysql-chopin.x10hosting.com;database=XXX_YYY;user id=ZZZ;password=???" />
<remove name="LocalMySqlServer"/>
<add name="LocalMySqlServer"
</connectionStrings>
...anything else you have
where XXX is your login ID, YYY is the name of your database: so if you run phpMyAdmin it will show a database as XXX_YYY
ZZZ is the userid as set via phpMYAdmin,
??? is the user password fro ZZZ
Doing it this way makes it easier to debug locally as your online web.config can contain different values from your local system - my local system for example uses "localhost".
The really important bit is "mysql-chopin.x10hosting.com" rather than "localhost".
Haven't tried the dataadapter binding, but if the above works it should all be obvious.