mysql 强制用户ssl连接
mysql -h 主机名(ip) -u 用户名 -P 端口 -p
show databases;
create user 'everifyer'@'%' identifyed by 'everifyertz321';
everifyer/everifyertz321
show grants for everifytz
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON . TO everifytz
@`%` WITH GRANT OPTION;
ALTER USER 'encrypted_user'@'%' REQUIRE SSL;
select host, user from mysql.user;
jdbc参数
useSSL=true&verifyServerCertificate=false&requireSSL=true