当前位置:   article > 正文

mysql8.0 关闭ssl连接_mysql8.0 使用 x509设置加密连接

mysql命令 停止ssl

[root@db143 client]# mysql -h 192.168.142.145 --ssl-cert=/data/client/client-cert.pem --ssl-key=/data/client/client-key.pem -uuser_w -p‘user_w_pwd‘

mysql: [Warning] Using a password onthe command line interface can be insecure.

Welcometo the MySQL monitor. Commands end with ; or\g.

Your MySQL connection idis 16Server version:8.0.18 MySQL Community Server -GPL

Copyright (c)2000, 2019, Oracle and/or its affiliates. Allrights reserved.

Oracleis a registered trademark of Oracle Corporation and/orits

affiliates. Other names may be trademarksoftheir respective

owners.

Type‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the currentinput statement.

mysql>\s;--------------

mysql Ver 8.0.18 for linux-glibc2.12 on x86_64 (MySQL Community Server -GPL)

Connection id:16

Current database:Current user: user_w@192.168.142.143SSL: Cipherin use isTLS_AES_256_GCM_SHA384Currentpager: stdout

Using outfile:‘‘Using delimiter: ;

Server version:8.0.18 MySQL Community Server -GPL

Protocol version:10Connection:192.168.142.145 via TCP/IP

Server characterset: utf8mb4

Db characterset: utf8mb4

Client characterset: utf8mb4

Conn. characterset: utf8mb4

TCP port:3306Uptime:22 min 7sec

Threads:3 Questions: 35 Slow queries: 0 Opens: 1162 Flush tables: 3 Open tables: 48 Queries per second avg: 0.026

--------------

ERROR:

No query specified

mysql> exit

[root@db143 client]# mysql -h 192.168.142.145 -uuser_w -p‘user_w_pwd‘ mysql: [Warning] Using a password on the command line interface can be insecure.

ERROR 1045 (28000): Access denied for user ‘user_w‘@‘192.168.142.143‘ (using password: YES)

[root@db143 client]#

# 如果是从库的话,需要使用自己的pem

[root@db143 data]# mysql -h 192.168.142.143 --ssl-cert=/data/mysql/mysql_3306/data/client-cert.pem --ssl-key=/data/mysql/mysql_3306/data/client-key.pem -uuser_w -p‘user_w_pwd‘

mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 23

Server version: 8.0.18 MySQL Community Server - GPL

Copyright (c) 2000, 2019, 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> exit

Bye

[root@db143 data]#

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/518771
推荐阅读
相关标签
  

闽ICP备14008679号