MySQL Forums
Forum List  »  Connector/ODBC

Re: ODBC and remote server
Posted by: Bogdan Degtyariov
Date: August 06, 2023 11:51PM

The MySQL Workbench is not using ODBC to connect to MySQL Server. Therefore, the names of connection attributes it uses are different. However, you can use the values.

With SQLDriverConnect() you need to compose a connection string correctly. For instance:

"Driver={MySQL ODBC 8.0 ANSI Driver};SERVER=;UID=...;PWD=****;PORT=3306"

With SQLConnect() you would need to pre-configure a DSN in ODBC Data Source Administrator and use the DSN name as one of the parameters for SQLConnect().

More detailed information about the ODBC driver connection options can be found here:

Options: ReplyQuote

Written By
August 04, 2023 08:18AM
Re: ODBC and remote server
August 06, 2023 11:51PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.