Qu'est-ce qu'un Data Source Name , ou Nom de Source de Données?
<<<
Configuration du DSN MyODBC sur Windows Configuration d'un DSN MyODBC sous Unix
>>>

22.1.9 MyODBC Configuration
22.1 Support ODBC de MySQL
22 Pilotes MySQL
 Manuel de Référence MySQL 4.1 : Version Française

Qu'est-ce qu'un Data Source Name , ou Nom de Source de Données?
->Configuration du DSN MyODBC sur Windows
Configuration d'un DSN MyODBC sous Unix
Paramètres de connexion
Se connecter sans définir de DSN
Etablir une connexion distante d'un système A à un système B
Obtenir un fichier de trace ODBC
Applications Tested with MyODBC
Programs Known to Work With MyODBC

22.1.9.2 Configuration du DSN MyODBC sur Windows

Pour ajouter et configurer une nouvelle source de données MyODBC sur Windows, utilisez le ODBC Data Source Administrator . Le ODBC Administrator modifie les informations de connexion à la source de données. En ajoutant de nouvelles sources, le ODBC Administrator met à jour la base des registres pour vous.

To open the ODBC Administrator from the Control Panel:

  • Click Start , point to Settings , and then click Control Panel .
  • 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 . @image{Images/mydsn-icon}

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

    @image{Images/mydsn}

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

To add a data source on Windows:

  • Open the ODBC Data Source Administrator .
  • In the ODBC Data Source Administrator dialog box, click Add . The Create New Data Source dialog box appears.
  • Select MySQL ODBC 3.51 Driver , and then click Finish . The MySQL ODBC 3.51 Driver - DSN Configuration dialog box appears, as shown here:

    @image{Images/mydsn-setup}

  • 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.
  • In the Description box, enter the description needed for the DSN.
  • 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 .
  • In the Database Name box, enter the name of the MySQL database that you want to use as the default database.
  • In the User box, enter your MySQL username (your database user ID).
  • In the Password box, enter your password.
  • In the Port box, enter the port number if it is not the default (3306).
  • 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:

    @image{Images/mydsn-example}

    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:

@image{Images/mydsn-test-success}

A failed test results in an error:

@image{Images/mydsn-test-fail}

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 Connection Parameters for information about the meaning of these options.

@image{Images/mydsn-options}

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:
  • Open the ODBC Data Source Administrator . Click the appropriate DSN tab.
  • 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.
  • 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.

<< Configuration du DSN MyODBC sur Windows >>
Qu'est-ce qu'un Data Source Name , ou Nom de Source de Données? MyODBC Configuration Configuration d'un DSN MyODBC sous Unix