[Mono-list] Simple MySql Connection Problem

Petit Eric surfzoid at gmail.com
Wed Aug 26 03:36:41 EDT 2009


Basicaly, this work fine in all case for me (win, nux...)


//Snippet start here
using MySql.Data.MySqlClient;

using System.Windows.Forms;

MySqlConnection mySqlConnection1 = new MySqlConnection();
mySqlConnection1.ConnectionString =
"server=localhost;password=THE_PASSWORD;user id=root";
if (mySqlConnection1.State != ConnectionState.Open) mySqlConnection1.Open();

                    MessageBox.Show("Server Version is : " +
mySqlConnection1.ServerVersion, "Info",

                        MessageBoxButtons.OK, MessageBoxIcon.Information);

                    mySqlConnection1.Close();

//Snippet end here


2009/8/25 Daniel Soto <daniel.soto2k at gmail.com>:
> I'm not sure if MySql on Windows can use named pipes to connect to the
> server, if it use named pipes, you should use TCP/IP.
>
> I developed a Linux Mono app with Ubuntu, the connection string must have a
> explicit number port (3306), and a firewall rule that allows incoming
> connections to this port. It worked fine.
>
> My machine with Ubuntu had Firestarter, and it caused on me a severe
> headache because I forgot to set incoming connections to the port 3306.
>
> Try it and tell us if you have luck.
>
> Regards.
>
> 2009/8/25 Diego Frata <diego.frata at gmail.com>
>>
>> Yeah, it wasn't so clear before... Now I'm clueless about what could
>> possibly be wrong. Anyone else?
>>
>> Diego Frata
>> diego.frata at gmail.com
>>
>>
>> On Tue, Aug 25, 2009 at 12:44 PM, Chris Howie <cdhowie at gmail.com> wrote:
>>>
>>> On Mon, Aug 24, 2009 at 10:49 PM, Diego Frata<diego.frata at gmail.com>
>>> wrote:
>>> > The first test you run, you run on Windows, right? After that you try
>>> > to
>>> > runc the same application with Mono. Is that right?
>>>
>>> My understanding is that he is testing with Mono on Windows, on the
>>> same box he is testing it under .NET with.
>>>
>>> --
>>> Chris Howie
>>> http://www.chrishowie.com
>>> http://en.wikipedia.org/wiki/User:Crazycomputers
>>
>>
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>



-- 
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious


More information about the Mono-list mailing list