The invention discloses a MySQL
public network encryption transmission method and
system based on an X.509
certificate and Srunnel, and relates to the technical field of
network security and
database communication,
secure communication of a MySQL
database in a
public network environment is realized by deploying a Srunnel
encryption agent module at a
client and a
server and establishing a bidirectional
authentication TLS
encryption tunnel based on the X.509 digital
certificate, and the security of the MySQL
database in the
public network environment is improved. The method comprises the steps that a
certificate issuing mechanism
root certificate is generated, a
server certificate and a
client certificate are signed and issued, a Srunnel
server agent module and a
client agent module are configured, a certificate path and a
verification level are set, a MySQL client carries out TLS
handshake and two-way
certificate verification through a local Srunnel agent and a server Srunnel agent, after an encryption tunnel is established, data are transmitted in an encrypted mode, and the data are transmitted to the server Srunnel agent. The method supports an RSA and SM2 dual-certificate
system, end-to-end encryption and strong identity
authentication are realized, man-in-the-middle
attack and data leakage risks are effectively defended, and the method is suitable for the fields of finance, government affairs and the like which have strict requirements on
data security.