mysql -h 主机名(ip) -u 用户名 -P 端口 -p
show databases;
create user 'userxxx'@'%' identified by 'passxxx';
show grants for userxxx
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 `userxxx`@`%` WITH GRANT OPTION;
ALTER USER 'userxxx'@'%' REQUIRE SSL;
flush privileges;
select host, user from mysql.user;
jdbc参数
useSSL=true&verifyServerCertificate=false&requireSSL=true