[Mono-list] Looking for advice on accessing MySQL database

Chris Howie cdhowie at gmail.com
Sat Nov 1 11:58:37 EDT 2008

On Thu, Oct 30, 2008 at 5:27 PM, TraLou <louis at traglobal.com> wrote:
> I copied the executable and MySQL.Data.dll over to openSuse and set up the
> shell script as recommended.  When I launch my app everything works right up
> until Open() is called on the MySQLConnection object.  It then throws an
> exception and states that it could not connect to any of the MySQL
> databases.
> I have tried with MySQL.Data.dll versions 5.1.7 and 5.2.3. My connection
> string looks like the following:
> Database=dbname;Data Source=hostIp;User
> ID=user;Password=password;Pooling=false;Connection Timeout=10;
> I tried also adding Protocol=socket;Port=3306; as recommended on someone's
> blog but no luck there.
> The MySQL database is on my dev machine that the VM is running on.  I can
> ping from the VM to the host with no issues and I can access MySQL remotely
> from my application on another Windows machine using the same credentials.
> I'm sure that a ton of people must be using MySQL so I'm hoping that I'm
> just missing something simple.

A couple of other things to try:

* Can you use the mysql command-line client from inside the VM to
connect to the MySQL instance on the host?

* If you run a packet sniffer (like Wireshark) in the VM, do you see
anything interesting happen when you try to connect using Mono?

Chris Howie

More information about the Mono-list mailing list