[Mono-list] mono and mysql

Steven Balthazor stevenbalthazor@hotmail.com
Sun, 29 Dec 2002 13:37:55 -0700

I am using mono version 0.17

I used the test files in mcs/class/Mono.Data.MySql/test (from cvs); in
particular I used TestMySqlExecuteReader.cs.

To make it work you need to change the lines:
			connectionString = 
connectionString = 

And change: 
			sql = "select * from db";
A useful query on your database server.

I found the page on the mono website about testing postgresql helpful (it
appears the test cases are ported from postgres):

-----Original Message-----

From: Alexander van Berne [mailto:Alexander.vanBerne@xs4all.nl] 
Sent: Sunday, December 29, 2002 1:10 PM
To: Steven Balthazor; mono-list@ximian.com
Subject: Re: [Mono-list] mono and mysql

I'm not  sure if I'm able to help you, see some answers below. 

Propably you're able to help me as well (would be appreciated). Right now
not able to connect to MySQL. Which mono version do you use? How do make a 
connection? Can you send me a sample of your code?



On Friday 27 December 2002 16:16, Steven Balthazor wrote:
> I am new to mono/.Net and have been lurking on the list for sometime; 
> I finally found some time to install mono and try it out.
> I got mysql working with mono using the included classes 
> (Mono.Data.Mysql) but I had to do some odd things.
> To get it to compile correctly on Linux I had to add a link from 
> /usr/lib/libmysqlclient.so to /usr/lib/libmySQL.so e.g.: ln -s 
> libmysqlclient.so libmySQL.so
> Question 1: Is this just an oddity from my installation (I am running 
> Redhat 7.3/mono rpm version) or is this normal?
You should have been able to specify it in the config file e.g. 

> then I had to compile it with the commandline:
> mcs file.cs -r System.Data.dll -r Mono.Data.MySql.dll
> Question 2: Is it possible to specify in a file somewhere the location 
> of the libraries so that I don't need to use the -r parameters 
> everytime I compile?
A shell script will do the trick

> On windows (I used the windows installer) I had some difficulties 
> getting it to compile until I used the following command line: monomcs 
> file.cs -L c:\mono-0.17\install -r System.Data.dll -r 
> Mono.Data.MySql.dll
> Question 3: Is it possible to specify the library (-L) somewhere in a 
> file so that it does not need to be passed everytime I compile?
I've not used mono windows yet

> Question 4: I am planning on doing some work/testing with Mysql using 
> Mono and was wondering which product/component should I use to 
> report/query bugs? There are a couple of different options; none seem 
> to fit exactly.
Have you tried http://bugzilla.ximian.com/ ?

> Thanks for any help anyone can provide.  I hope to provide more help 
> and less lurking in the future.
> Cheers,
> Steven Balthazor

Linux is like a wigwam, no windows, no gates and an apache inside

Linux is like a wigwam, no windows, no gates and an apache inside