指定客户端连接方式
MySQL服务端在对客户端授权的时候,可以通过选项指定客户端连接MySQL 服务器的SSL级别,参考MySQL赋权的 REQUIRE值mysql证书密钥怎么填:
ssl_option
SSL: 不认证客户端,客户端不需要提供证书
X509: 客户端必须发送一个有效的X509证书
issuer: 客户端的证书是否是服务器所配置的CA颁发的(在我们场景下是ca_cert.cer颁发的证书)
subject: 认证证书的subject(关于证书的subject在之前的文章有介绍)
cipher: 指定加密算法
这些选项可以叠加使用,如mysql证书密钥怎么填:X509|issuser
客户端连接(SSL方式)
mysql 客户端连接
mysql -u root -pChangeme_123 -P 3306 --ssl-ca=/home/yunweipai/user_certs/ca_cert.cer
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 5.5.43-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql \s
--------------
mysqlVer 14.14 Distrib 5.5.43, for debian-linux-gnu (i686) using readline 6.2
Connection id:36
Current database:
Current user:root@localhost
SSL:Cipher in use is DHE-RSA-AES256-SHA
Current pager:stdout
Using outfile:''
Using delimiter:;
Server version:5.5.43-0ubuntu0.12.04.1 (Ubuntu)
Protocol version:10
Connection:Localhost via UNIX socket
Server characterset:latin1
Dbcharacterset:latin1
Client characterset:latin1
Conn.characterset:latin1
UNIX socket:/var/run/mysqld/mysqld.sock
Uptime:29 sec
Threads: 1Questions: 109Slow queries: 0Opens: 48Flush tables: 1Open tables: 41Queries per second avg: 3.758
--------------
JDBC连接
在jdbc字符串中增加下面参数
useSSL=trueverifyServerCertificate=false
这么就不需要客户端配置证书了,配置就简单很多 。因为mysql本身有账号口令认证 , 因此不需要证书认证 。
mysql证书密钥怎么填的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于mysql证书含金量、mysql证书密钥怎么填的信息别忘了在本站进行查找喔 。
- mysql游标和存储过程是什么 mysql游标表名为变量
- 如何使用cmd命令行提示符登录mysql服务器 cmd中登陆mysql
- mysql怎么设置时区 mysql时间显示设置
- 招聘要精通mysql
- mysql 65535 8192 限制 mysql限制资源使用
- mysql有topn
- mysql协议包解析 mysqlicp协议
- mysql子查询和连接查询 mysql子查询插入
- Mysql使用索引查询 mysql使用round
- mysql下到了c盘 mysql怎么不存到c盘
