comprehensive documentation repository

MySQL 5.5 Reference Manual

22.2.2.2. Installing Connector/NET on Unix with Mono

There is no installer available for installing the Connector/NET
component on your Unix installation. Before installing, please
ensure that you have a working Mono project installation. You can
test whether your system has Mono installed by typing:

shell> mono --version

The version of the Mono JIT compiler will be displayed.

To compile C# source code you will also need to make sure a Mono
C# compiler, is installed. Note that there are two Mono C#
compilers available, mcs, which accesses the
1.0-profile libraries, and gmcs, which acesses
the 2.0-profile libraries.

To install Connector/NET on Unix/Mono:

Download the
mysql-connector-net-version-noinstall.zip
and extract the contents to a directory of your choice, for
example: ~/connector-net/.

In the directory where you unzipped the connector to, change
into the bin directory. Ensure the file
MySql.Data.dll is present.

You must register the Connector/NET component,
MySql.Data, in the Global Assembly Cache
(GAC). In the current directory enter the
gacutil command:

root-shell> gacutil /i MySql.Data.dll

This will register MySql.Data into the GAC.
You can check this by listing the contents of
/usr/lib/mono/gac, where you will find
MySql.Data if the registration has been
successful.

You are now ready to compile your application. You must ensure
that when you compile your application you include the
Connector/NET component using the -r:
command-line option. For example: