其他连接方式

最近更新时间: 2024-10-17 17:10:00

分布式实例高度兼容 MySQL 的连接协议和语法,支持 SSL 加密,也支持 JDBC、ODBC、PHP、Python 等相关协议和语法,例如:

private final String USERNAME = "your_username";
private final String PASSWORD = "your_password";
private final String DRIVER = "com.mysql.jdbc.Driver";
private final String URL = "jdbc:mysql://ip:port?userunicode=true&characterEncoding=utf8mb4";
private Connection connection;
private PreparedStatement pstmt;
private ResultSet resultSet;