swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.46k stars 3.16k forks source link

Swoole MySQL SSL support? #1996

Closed re-thc closed 6 years ago

re-thc commented 6 years ago

Hi, is it possible for the MySQL SSL Async client to connect a MySQL secured by SSL? I couldn't see this in the configuration. Thanks.

twose commented 6 years ago

Use Swoole\Coroutine\MySQL is a better way, not async now.

I have received many similar questions recently: SSL is not necessary, SSL will increase connection overhead, CPU usage, memory usage, and response time. In a production environment, MySQL is generally deployed in an intranet environment, even for clusters. The MySQL handshake uses very secure RSA encryption, and MySQL has been enhancing the security of handshakes for a long time. For enterprises, no MySQL uses SSL connections as I know, and the existing methods are safe enough. MySQL is always a performance bottleneck, we will support SSL in the future, but not the first priority.