惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
Jina AI
Jina AI
博客园 - Franky
U
Unit 42
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享
B
Blog RSS Feed
雷峰网
雷峰网
D
DataBreaches.Net
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
美团技术团队
云风的 BLOG
云风的 BLOG
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
G
Google Developers Blog
T
Tailwind CSS Blog
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
月光博客
月光博客
Engineering at Meta
Engineering at Meta

MySQL Forums

MySQL :: Workbench update to 26.7.0 MySQL :: Upgrade Problems Starting a Discussion About Database Migration Best practices for indexing large tables with frequent updates? Discrepancy in Compatibility statement with MySQL and Connector/J 26.7 Announcing August 2026 Releases featuring MySQL Server, MySQL NDB Cluster, Shell and Connector/ODBC How to Troubleshoot Slow MySQL Queries Using EXPLAIN and Indexes The future of the timestamp data type Linking 2 cells in a table MySQL :: MySQL syntax error replication from 8.0 to 8.4 error How should I design a MySQL schema for storing construction material calculations? (no replies) Can AI analyze market trends faster than traditional trading (no replies) This CMD window bothers me. Announcing July 2026 Releases featuring MySQL Server 26.7.0, 9.7.2 and 8.4.11 Can I purge binlog files after migration ? Can't update expired password in Mysql Workbench Assistance with MySql application and Sql server MySQL :: MySQL Community Governance Model Announcing June 2026 Releases featuring MySQL Server 9.7.1 and 8.4.10 GoHighLevel Webhook Data in MySQL I'm troubleshooting MySQL query performance (no replies) What could cause .frm and .ibd mismatches across multiple tables? Problem with creating a connection to a remote database on local network Best MySQL schema for storing image processing jobs? APT Repository not working on Ubuntu 26.04 How do you create a remote connection to a database (no replies) MySQL :: storing and reading blob ODBC Connector almost always alters it's name and path MySQL :: Connector/Windows
: connect --ssl-mode:REQURED< : MYSQL_OPT_SSL_MODE
Jorge Luis B · 2026-05-02 · via MySQL Forums

connect --ssl-mode:REQURED< : MYSQL_OPT_SSL_MODE


Hello everyone, my name is Jorge. I work with the Xbase++ language and use the MySQL libmysql.dll library version 8.0.44.
The issue I’m having is that I can’t correctly set the options to connect to a database with SSL enabled.
From the command line it works perfectly with:
mysql -h <ip> -P 3306 -u <user> -p --ssl-mode=REQUIRED
However, in my application I execute the following steps and I can’t get it to connect:

MYSQL_OPT_SSL_MODE I searched for it on Google because in xbase I don't have the possibility of accessing the structures of mysql.h and mysql_com.h
#define MYSQL_OPT_SSL_MODE 129

nFlag := 0
cSocket := ''
nPort := 3306
pMySql := mysql_init()

nMode := U2Bin( 2 ) // "REQUIRED"
mysql_options( pMySql, MYSQL_OPT_SSL_MODE, @nMode )

mysql_real_connect( @pMysql, @cServer, @cUser, @cPassword, NIL, @nPort, @cSocket, @nFlag )

I also tried setting the call to mysql_ssl_set( @pMySql ) before mysql_real_connect(), and combining it with the parameter nFlag := CLIENT_SSL (value 2048), but without success.
Could you help me understand what the correct steps are to configure SSL in this scenario and get the connection to work the same way as from the mysql.exe client with --ssl-mode=REQUIRED?
Thank you very much for your time and any guidance you can provide!


Subject

Views

Written By

Posted

connect --ssl-mode:REQURED< : MYSQL_OPT_SSL_MODE

55

May 02, 2026 08:57AM

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.