HP OSMS Blueprint: Database Server on HP Server Platforms with MySQL and RHEL5

MySqlConnection
MySqlDataAdapter
MySqlDataReader
Based on these classes, developers can build applications using their choice of .NET languages.
For more information on MySQL Connector/.NET, see the MySQL 5.0 Reference Manual located
at:
http://dev.mysql.com/doc/refman/5.0/en/connector-net.html
Use the following steps to configure MySQL Connector/.NET.
1. Download and install MySQL Connector/.NET. The package can be downloaded at:
http://dev.mysql.com/downloads/connector/net/5.0.html
2. Use Windows Explorer to verify that the MySQL Connector/.NET module is in the
c:\Windows\assembly directory, as displayed in Figure 15.
Figure 15 .NET Framework Configuration Manager
3. To make the namespaces of MySQL Connector/.NET retrievable by .NET applications, so
that the connector classes can be used in IIS, edit the web.config file and add the following
content:
<add assembly="MySql.Data, Version=5.0.7.0, Culture=Neutral, PublicKeytoken=c5687fc88969c44d"/>
</asemblies>
NOTE: The web.config file is usually located in the
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG directory.
NOTE: If you do not edit the file, the error message CS0246: The type or namespace
name 'MySql' could not be found occurs when compiling applications using MySQL
Connector/.NET.
4. Provide database information in the application. For example, you can enter the following
connection string:
Database=osmsdb;Data Source=10.100.0.71;User Id=osmusr;Password=osmusr
When .NET applications connect to the MySQL server, an instance of MySqlConnection
needs to be created and a connection string with the correct database information is provided
in the application.
Connecting External Systems to the MySQL Database 39