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=127.0.0.1;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:

https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-connection-parameters.html

Options: ReplyQuote


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


Sorry, you can't reply to this topic. It has been closed.

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.