zoukankan      html  css  js  c++  java
  • 为Mono安装MySql连接驱动

    为Mono安装MySql连接驱动(转)

    DOTNET and Mono by default only support database connections to the Microsoft SQL Server through System.Data.SqlClient module. To make a connection to the MySQL server you need a connector module from MySQL.

    Proceed with the following steps to obtain and install the MySQL .NET Connector:

    1. Downloading MySQL .NET Connector

    Either from MySQL (requires registration):

    http://www.mysql.com/downloads/mirror.php?id=399565

    or directly from one of the mirros:

    ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-Net/mysql-connector-net-6.3.6-noinstall.zip

    2. Unzip the content into a directory

    ~> md connector
    ~> cd connector
    ~/connector> unzip ../mysql-connector-net-6.3.6-noinstall.zip
    ~/connector> ls
    CHANGES  COPYING  MySql.Data.chm  README  Release Notes.txt  v2  v4

    3. Change names of assemblies to proper names

    ~/connector> cd v2
    ~/connector/v2/ mv mysql.data.cf.dll MySql.Data.Cf.dll
    ~/connector/v2> mv mysql.data.dll MySql.Data.dll
    ~/connector/v2> mv mysql.data.entity.dll MySql.Data.Entity.dll
    ~/connector/v2> mv mysql.visualstudio.dll MySql.VisualStudio.dll
    ~/connector/v2> mv mysql.web.dll MySql.Web.dll
    ~/connector/v2> cd ../v4
    ~/connector/v4> mv mysql.data.dll MySql.Data.dll
    ~/connector/v4> mv mysql.data.entity.dll MySql.Data.Entity.dll
    ~/connector/v4> mv mysql.visualstudio.dll MySql.VisualStudio.dll
    ~/connector/v4> mv mysql.web.dll MySql.Web.dll

    4. Copy assemblies into library directory of your mono installation

    ~/connector/v4> su
    /home/user/connector/v4 # cp MySql.* /usr/lib/mono/4.0/.
    /home/user/connector/v4 # cd ../v2
    /home/user/connector/v2 # cp MySql.* /usr/lib/mono/2.0/.

    5. Register the installed assemblies in the global assembly cache

    ~ # cd /usr/lib/mono/4.0
    /usr/lib/mono/4.0 # gacutil -i MySql.Data.dll
    /usr/lib/mono/4.0 # gacutil -i MySql.Data.Entity.dll
    /usr/lib/mono/4.0 # gacutil -i MySql.VisualStudio.dll
    /usr/lib/mono/4.0 # gacutil -i MySql.Web.dll
    /usr/lib/mono/4.0 # cd ../2.0
    /usr/lib/mono/2.0 # gacutil -i MySql.Data.Cf.dll
    /usr/lib/mono/2.0 # gacutil -i MySql.Data.dll
    /usr/lib/mono/2.0 # gacutil -i MySql.Data.Entity.dll
    /usr/lib/mono/2.0 # gacutil -i MySql.VisualStudio.dll
    /usr/lib/mono/2.0 # gacutil -i MySql.Web.dll

    Note: For steps 3 (renaming) and 4 (copying), I don’t really understand why these steps are necessary, but on my OpenSuSE 11.3 machine it did only work out that way. Any suggestions to improve this procedure are welcome.

    原文地址(已被墙):http://2sharp4u.wordpress.com/2011/01/08/installing-mysql-connector-for-mono/

  • 相关阅读:
    读书笔记:7个示例科普CPU Cache
    no such partition grub rescue>
    这些个云盘
    原版win7镜像IE主页被篡改?
    JS判断访问设备、客户端操作系统类型
    floodlight make the VMs can not getDHCP IP address
    MPI之聚合通信-Scatter,Gather,Allgather
    MPI 环境搭建问题-运行程序闪退
    【算法、递归回溯解决数独】
    算法【最大子序列问题】
  • 原文地址:https://www.cnblogs.com/icedog/p/mono_mysql.html
Copyright © 2011-2022 走看看