Menu

MySQL and Mono

robinhoens

To use Nlatexdb with MySQL database and Mono (under Linux, MacOS, etc.), follow these steps:

  1. Install Mono, if it isn't installed yet: http://www.mono-project.com
  2. Install the .Net driver for MySQL following these instructions:
    http://dev.mysql.com/doc/refman/5.1/en/connector-net-installation-unix.html
    Note that Linux is case sensitive, so the file should be named "MySql.Data.dll" when you install it in the GAC.
  3. Under Mono, you might have to add it to the machine.config file (whereas under Windows, this will be done automatically by the installer). Supposing you install the version 6.3.7, you should add this line to the machine.config file:

    <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />

    See here: http://stackoverflow.com/questions/3987266/mysql-connector-with-mod-mono-and-mono-2-6-7

  4. Now, nlatexdb -P should show something like this:

    Name:MySQL Data Provider
    Description:.Net Framework Data Provider for MySQL
    InvariantName:MySql.Data.MySqlClient
    AssemblyQualifiedName:MySql.Data.MySqlClient.MySqlClientFactory,
    MySql.Data, Version=6.3.7.0, Culture=neutral,
    PublicKeyToken=c5687fc88969c44d

  5. And then you should be able to connect to a MySQL database with an ordinary MySQL connection string, described here: http://www.connectionstrings.com/mysql

  6. Although nlatexdb should work with any .Net runtime version 2.0 and above, it was reported that a command line like this was needed: mono --runtime=v4.0 nlatexdb.exe -p hello.tex


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.