Creating a Data Source Name
Typically, after installing the Simba MySQL ODBC Driver, you need to create a Data Source Name (DSN).
Alternatively, for information about DSN-less connections, see Using a Connection String.
To create a Data Source Name:
- From the Start menu, go to ODBC Data Sources.
- In the ODBC Data Source Administrator, click the Drivers tab, and then scroll down as needed to confirm that the Simba MySQL ODBC Driver appears in the alphabetical list of ODBC connectors that are installed on your system.
- Choose one:
- To create a DSN that only the user currently logged into Windows can use, click the User DSN tab.
- Or, to create a DSN that all users who log into Windows can use, click the System DSN tab.
- Click Add.
- In the Create New Data Source dialog box, select Simba MySQL ODBC Driver and then click Finish. The Simba MySQL ODBC Driver DSN Setup dialog box opens.
- In the Data Source Name field, type a name for your DSN.
- Optionally, in the Description field, type relevant details about the DSN.
- In the User field, type an appropriate user name for accessing the MySQL database.
- If you are required to authenticate the connection using the native, caching_sha2_password, or SHA-256 authentication plugin, then in the Password field, type the password corresponding to the user name you typed above.
- Optionally, if you are authenticating the connection using the caching_sha2_password or SHA-256 authentication plugin, specify an RSA public key for encrypting your password by doing the following:
- Select the SSL tab.
- In the RSA Public Key field, specify the full path and name of the file containing the key.
- In the Host field, type the name or IP address of the MySQL server.
- In the Port field, type the number of the TCP port that the server uses to listen for client connections.
- In the Catalog field, type the name of the database that you want to connect to by default.
- To configure logging behavior for the connector, click Logging Options. For more information, see Configuring Logging Options.
- To configure additional connector options, select a tab:
- Select the Connection tab to configure how the connector handles connections and specify connector behavior that applies at connection time. For more information, see Configuring Connection Options.
- Select the Metadata tab to configure how the connector handles specific types of data. For more information, see Configuring Metadata Options.
- Select the Cursor/Results tab to configure how the connector handles cursors and query results. For more information, see Configuring Cursor and Result Options.
- Select the SSL tab to configure encryption and identity verification using SSL. For more information, see Configuring SSL Connections.
- Select the Misc tab to configure other additional connector options. For more information, see Configuring Additional Connector Options.
- To test the connection, click Test. Review the results as needed, and then click OK.
- To save your settings and close the Simba MySQL ODBC Driver DSN Setup dialog box, click OK.
- To close the ODBC Data Source Administrator, click OK.
Note:
Make sure to select the ODBC Data Source Administrator that has the same bitness as the client application that you are using to connect to MySQL.
Note:
It is recommended that you create a System DSN instead of a User DSN. Some applications load the data using a different user account, and might not be able to detect User DSNs that are created under another user account.
Note:
If you do not specify an RSA public key or configure SSL for your connection, the connector automatically retrieves a public key from the server and uses it to encrypt your password.
Note:
The default port used by MySQL is 3306.
Note:
You can still issue queries on other databases by specifying the database schema in your query statement.
Note:
If the connection fails, then confirm that the settings in the Simba MySQL ODBC Driver DSN Setup dialog box are correct. Contact your MySQL server administrator as needed.