22.2.2.1. Installing Connector/NET on Windows

On Windows, installation is supported either through a binary installation process or by downloading a Zip file with the Connector/NET components.

Before installing, you should ensure that your system is up to date, including installing the latest version of the .NET Framework.

22.2.2.1.1. Installing Connector/NET using the Installer

Using the installer is the most straightforward method of installing Connector/NET on Windows and the installed components include the source code, test code and full reference documentation.

Connector/NET is installed through the use of a Windows Installer (.msi) installation package, which can be used to install Connector/NET on all Windows operating systems. The MSI package in contained within a ZIP archive named mysql-connector-net-version.zip, where version indicates the Connector/NET version.

To install Connector/NET:

  1. Double-click the MSI installer file extracted from the Zip you downloaded. Click Next to start the installation.

    Connector/NET Windows Installer -
              Welcome
  2. You must choose the type of installation that you want to perform.

    Connector/NET Windows Installer -
              Installation type

    For most situations, the Typical installation will be suitable. Click the Typical button and proceed to Step 5. A Complete installation installs all the available files. To conduct a Complete installation, click the Complete button and proceed to step 5. If you want to customize your installation, including choosing the components to install and some installation options, click the Custom button and proceed to Step 3.

    The Connector/NET installer will register the connector within the Global Assembly Cache (GAC) - this will make the Connector/NET component available to all applications, not just those where you explicitly reference the Connector/NET component. The installer will also create the necessary links in the Start menu to the documentation and release notes.

  3. If you have chosen a custom installation, you can select the individual components that you want to install, including the core interface component, supporting documentation (a CHM file) samples and examples and the source code. Select the items, and their installation level, and then click Next to continue the installation.

    Note

    For Connector/NET 1.0.8 or lower and Connector 5.0.4 and lower the installer will attempt to install binaries for both 1.x and 2.x of the .NET Framework. If you only have one version of the framework installed, the connector installation may fail. If this happens, you can choose the framework version to be installed through the custom installation step.

    Connector/NET Windows Installer - Custom
              setup
  4. You will be given a final opportunity to confirm the installation. Click Install to copy and install the files onto your machine.

    Connector/NET Windows Installer -
              Confirming installation
  5. Once the installation has been completed, click Finish to exit the installer.

    Connector/NET Windows Installer - Finish
              installation

Unless you choose otherwise, Connector/NET is installed in C:\Program Files\MySQL\MySQL Connector Net X.X.X, where X.X.X is replaced with the version of Connector/NET you are installing. New installations do not overwrite existing versions of Connector/NET.

Depending on your installation type, the installed components will include some or all of the following components:

  • bin - Connector/NET MySQL libraries for different versions of the .NET environment.

  • docs - contains a CHM of the Connector/NET documentation.

  • samples - sample code and applications that use the Connector/NET component.

  • src - the source code for the Connector/NET component.

You may also use the /quiet or /q command-line option with the msiexec tool to install the Connector/NET package automatically (using the default options) with no notification to the user. Using this method the user cannot select options. Additionally, no prompts, messages or dialog boxes will be displayed.

C:\> msiexec /package conector-net.msi /quiet

To provide a progress bar to the user during automatic installation, use the /passive option.

22.2.2.1.2. Installing Connector/NET using the Zip packages

If you are having problems running the installer, you can download a Zip file without an installer as an alternative. That file is called mysql-connector-net-version-noinstall.zip. Once downloaded, you can extract the files to a location of your choice.

The file contains the following directories:

  • bin - Connector/NET MySQL libraries for different versions of the .NET environment.

  • Docs - contains a CHM of the Connector/NET documentation.

  • Samples - sample code and applications that use the Connector/NET component.

Connector/NET 6.0.x has a different directory structure:

  • Assemblies - contains a collection of DLLs that make up the connector functionality.

  • Documentation - contains the Connector/NET documentation as a CHM file.

  • Samples - sample code and applications that use the Connector/NET component.

There is also another Zip file available for download called mysql-connector-net-version-src.zip. This file contains the source code distribution.

The file contains the following directories:

  • Documentation - This folder contains the source files to build the documentation into the compiled HTML (CHM) format.

  • Installer - This folder contains the source files to build the Connector/NET installer program.

  • MySql.Data - This folder contains the source files for the core data provider.

  • MySql.VisualStudio - This folder contains the source files for the Microsoft Visual Studio extensions.

  • MySql.Web - This folder contains the source files for the web providers. This includes code for the membership provider, role provider and profile provider. These are used in ASP.NET web sites.

  • Samples - This folder contains the source files for several example applications.

  • Tests - Ths folder contains a spreadsheet listing test cases.

  • VisualStudio - Contains resources used by the Visual Studio plug in.

Finally, you need to ensure that MySql.Data.dll is accessible to your program at build time (and run time). If using Microsoft Visual Studio you will need to add MySql.Data as a Reference to your project.

Note

If using MySQL Connector/NET 6.3.5 and above, the MySql.Data file provided will work with both .NET Framework 2.x and 4.x.

Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout