[monoing] Re: [Mono-list] Mysql (ByteFX) VS Mysql (Mono)

Marco Canini marco.canini@fastwebnet.it
04 Jun 2003 23:23:24 +0200


On Wed, 2003-06-04 at 14:44, Pablo Fischer wrote:
> Hi!
> 
> El día Wednesday 04 June 2003 12:08 a Marco Canini mandó el siguiente correo:
> > On Tue, 2003-06-03 at 14:05, Pablo Fischer wrote:
> > > Hi guys!
> > >
> > > Yesterday I was trying to connect to one of my mysql databases with the
> > > two forms (ByteFx and Mono.Data.MySql), the results are:
> > >
> > > a) With ByteFX I can compile it without problems, BUT when I run it (mono
> > > mysql.exe) I get this:
> >
> > From what I know this mean that your MySQL server is not configure to
> > accept connection through a TCP/IP port.
> So, whats the difference between Mono and ByteFX modules for MySql?, in both I 
> use: localhost, and I have this in my database:
> 
> grant all on mydatabase.* to myuser@localhost identified by 'mypasswd';
> 
> What could be happening?
> Thanks!
The difference is that mono.data.mysql is "only a binding" of
libmysqlclient to c# (mono), so it uses the standard libmysqlclient
which can connect to a mysql server through standard unix socket.
That said mysqlnet is a 100% managed data provider and i guess it
supports only tcp/ip connection.
In order to use it you need to reconfigure your mysqld to allow tcp/ip
connection.
> 
> >
> > > Unhandled Exception: System.Net.Sockets.SocketException: Connection
> > > refused in (unmanaged) mono(mono_raise_exception+0x20) [0x80c1460]
> > > in (unmanaged)
> > > mono(ves_icall_System_Net_Sockets_Socket_Connect_internal+0x72)
> > > [0x80da4c6]
> > > in <0x0005a> 00 System.Net.Sockets.Socket:Connect (System.Net.EndPoint)
> > > in <0x000b3> 00 ByteFX.Data.MySQLClient.Driver:CreateSocketStream
> > > (string,int) in <0x00038> 00 ByteFX.Data.MySQLClient.Driver:Open
> > > (string,int,string,string,bool)
> > > in <0x000e4> 00 ByteFX.Data.MySQLClient.MySQLConnection:Open ()
> > > in <0x00095> 00 .Test:Main (string[])
> > >
> > > b) With Mono.Data.Mysql, I can compile it without problems, when I run it
> > > (mono mysql2.exe) I get the data of the database (that is ok) but I also
> > > get this:
> >
> > For this i've no idea!
> Sh...t :-(, somebody knows why I get this errors with Mono? 
> 
> Thanks!
> 
> >
> > > ** (mysql2.exe:2517): WARNING **: Failed to load function my_thread_end
> > > from libmySQL
> > >
> > > ** (mysql2.exe:2517): WARNING **: Failed to load function my_thread_end
> > > from libmySQL
> > >
> > > ** (mysql2.exe:2517): WARNING **: Failed to load function my_thread_init
> > > from libmySQL
> > >
> > > ** (mysql2.exe:2517): WARNING **: Failed to load function my_thread_init
> > > from libmySQL
> > > /*The next lines are the DB data*/
> > > Name: Nike 06/02/2003 00:00:00
> > > Name: Nike 06/02/2003 00:00:00
> > > Name: Nike 06/02/2003 00:00:00
> > > /*End of DB Data*/
> > > Unhandled Exception: System.MissingMethodException: A missing method
> > > exception has occurred.
> > > in <0x00046> 06 Mono.Data.MySql.MySql:ThreadEnd ()
> > > in <0x000b5> 00 Mono.Data.MySql.MySqlConnection:CloseDataSource ()
> > > in <0x00053> 00 Mono.Data.MySql.MySqlConnection:Close ()
> > > in <0x0023e> 00 .Test:Main (string[])
> > >
> > > However, the code of both exes are from
> > > http://www.go-mono.com/mysql.html, and in both Im using the same server,
> > > username, password and server.
> > >
> > > What could be happening?
> > >
> > > I would like to discover why Im getting this error, thats why Im asking
> > > to the list cause Im using a MySql DataBase for a Point of Sale (PoS).
> > >
> > > thanks!
> > > Pablo Fischer (MX)
> >
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list