Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orm mysql ssl failure #2275

Open
wdidada126 opened this issue Mar 10, 2025 · 4 comments
Open

orm mysql ssl failure #2275

wdidada126 opened this issue Mar 10, 2025 · 4 comments

Comments

@wdidada126
Copy link

wdidada126 commented Mar 10, 2025

Notice
If you need support or clarification regarding the usage of Drogon in your project, visit the official Drogon support channel at gitter

Please create a new issue only if you think you have found a bug or if have a feature request/enhancement.

Describe the bug
A clear and concise description of what the bug is.

20250310 20:12:33.292000 24216 TRACE [~DbConnection] Destruct DbConn0x268BC7981C0 - ../DbConnection.h:121
20250310 20:12:33.327000 6820 ERROR Error(1129) "Host '112.26.202.18' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'" - MysqlConnection.cc:333
20250310 20:12:33.327000 6820 ERROR Failed to mysql_real_connect() - MysqlConnection.cc:335

To Reproduce
Steps to reproduce the behavior:

  1. config.json
    "db_clients": [
    {
    "rdbms": "mysql",
    "host": "127.0.0.1",
    "port": 3306,
    "dbname": "testdb",
    "user": "yyy",
    "passwd": "xxx",
    "is_fast": false,
    "number_of_connections": 2,
    "timeout": -1.0,
    "auto_batch": false
    }
    ],

Screenshots
If applicable, add screenshots to help explain your problem.
ssl failure

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 1.9.9/1.9.10

Additional context
Add any other context about the problem here.
some code and config file in Ubuntu 22,it is OK

@an-tao
Copy link
Member

an-tao commented Mar 11, 2025

Have you enabled ssl on the server side?

@wdidada126
Copy link
Author

wdidada126 commented Mar 11, 2025

mysql> SHOW VARIABLES LIKE 'have_ssl';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_ssl | YES |
+---------------+-------+
1 row in set (0.04 sec)

and Now I change to

have_ssl | DISABLED

error also exist

20250311 14:59:15.817000 21324 ERROR Failed to mysql_real_connect() - MysqlConnection.cc:335
20250311 14:59:15.881000 21408 TRACE [~DbConnection] Destruct DbConn0x20C378E4210 - ../DbConnection.h:121
20250311 14:59:15.916000 21408 ERROR Error(2026) "TLS/SSL error: SSL is required, but the server does not support it" - MysqlConnection.cc:333

@an-tao
Copy link
Member

an-tao commented Mar 11, 2025

[mysqld]
ssl-ca=/path/to/ca-cert.pem
ssl-cert=/path/to/server-cert.pem
ssl-key=/path/to/server-key.pem

@rafeeque1
Copy link

@an-tao i think its related to #2273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants