Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

26.1.9.2. Configuring a MyODBC DSN on Windows

To add and configure a new MyODBC data source on Windows, use the ODBC Data Source Administrator. The ODBC Administrator updates your data source connection information. As you add data sources, the ODBC Administrator updates the registry information for you.

To open the ODBC Administrator from the Control Panel:

  1. Click Start, point to Settings, and then click Control Panel.

  2. On computers running Microsoft Windows 2000 or newer, double-click Administrative Tools, and then double-click Data Sources (ODBC). On computers running older versions of Windows, double-click 32-bit ODBC or ODBC.

    ODBC Data Sources
              Icon

    The ODBC Data Source Administrator dialog box appears, as shown here:

    ODBC Data Source
              Administrator Dialog

    Click Help for detailed information about each tab of the ODBC Data Source Administrator dialog box.

To add a data source on Windows:

  1. Open the ODBC Data Source Administrator.

  2. In the ODBC Data Source Administrator dialog box, click Add. The Create New Data Source dialog box appears.

  3. Select MySQL ODBC 3.51 Driver, and then click Finish. The MySQL ODBC 3.51 Driver - DSN Configuration dialog box appears, as shown here:

    MySQL ODBC DSN
              Configuration Dialog
  4. In the Data Source Name box, enter the name of the data source you want to access. It can be any valid name that you choose.

  5. In the Description box, enter the description needed for the DSN.

  6. For Host or Server Name (or IP) box, enter the name of the MySQL server host that you want to access. By default, it is localhost.

  7. In the Database Name box, enter the name of the MySQL database that you want to use as the default database.

  8. In the User box, enter your MySQL username (your database user ID).

  9. In the Password box, enter your password.

  10. In the Port box, enter the port number if it is not the default (3306).

  11. In the SQL Command box, you can enter an optional SQL statement that you want to issue automatically after the connection has been established.

    The final dialog looks like this:

    Filled-In MySQL ODBC DSN
              Configuration Dialog

    Click OK to add this data source.

Note: Upon clicking OK, the Data Sources dialog box appears, and the ODBC Administrator updates the registry information. The username and connect string that you entered become the default connection values for this data source when you connect to it.

You can also test whether your settings are suitable for connecting to the server using the button Test Data Source. This feature is available only for the MyODBC 3.51 driver. A successful test results in the following window:

MyODBC Successful Connection
          Message

A failed test results in an error:

MyODBC Failed Connection Message

The DSN configuration dialog also has an Options button. If you select it, the following options dialog appears displaying that control driver behavior. Refer to Section 26.1.9.4, “Connection Parameters”, for information about the meaning of these options.

MyODBC Options Dialog

Note: The options listed under Driver Trace Options are disabled (grayed out) unless you are using the debugging version of the driver DLL.

To modify a data source on Windows:

  1. Open the ODBC Data Source Administrator. Click the appropriate DSN tab.

  2. Select the MySQL data source that you want to modify and then click Configure. The MySQL ODBC 3.51 Driver - DSN Configuration dialog box appears.

  3. Modify the applicable data source fields, and then click OK.

When you have finished modifying the information in this dialog box, the ODBC Administrator updates the registry information.


 
 
  Published under the terms of the GNU General Public License Design by Interspire