赞
踩
1. 查看数据库是否开启SSL加密连接功能
mysql> show variables like "%ssl%";
+--------------------+-----------------+
| Variable_name | Value |
+--------------------+-----------------+
| have_openssl | YES |
| have_ssl | YES |
| mysqlx_ssl_ca | |
| mysqlx_ssl_capath | |
| mysqlx_ssl_cert | |
| mysqlx_ssl_cipher | |
| mysqlx_ssl_crl | |
| mysqlx_ssl_crlpath | |
| mysqlx_ssl_key | |
| ssl_ca | ca.pem |
| ssl_capath | |
| ssl_cert | server-cert.pem |
| ssl_cipher | |
| ssl_crl | |
| ssl_crlpath | |
| ssl_fips_mode | OFF |
| ssl_key | server-key.pem |
+--------------------+-----------------+
17 rows in set, 1 warning (0.00 sec)
mysql>
2. Linux命令连接MySQL数据库(SSL方式)
(条件:下载ca.pem,client-cert.pem,client-key.pem至Linux环境)
#mysql -h[IP] -P[port] -u[username] --ssl-ca=/root/pem/ca.pem --ssl-cert=/root/pem/client-cert.pem --ssl-key=/root/pem/client-key.pem -p[password]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。