The invention discloses a MySQL encrypted traffic dynamic auditing method and device and a medium, and relates to the field of
database security, the method comprises the following steps: intercepting a
handshake request sent by a
client, generating a
proxy certificate in real time, and establishing a first
handshake connection with the
client through the
proxy certificate; decrypting the encrypted traffic in a first
encryption channel, wherein the first
encryption channel is a traffic
transmission channel pre-deployed with the
client; based on a preset multi-level
rule engine, performing level-by-level auditing on the decrypted
plaintext traffic; and re-encrypting the audited
plaintext traffic, and transmitting the encrypted
plaintext traffic to the MySQL
server through a second
encryption channel, the second encryption channel being a traffic
transmission channel pre-deployed with the MySQL
server. On the premise of not damaging encrypted communication, complete
SQL operation
semantics are recorded, a traceable log meeting the requirements of a supervision mechanism is generated, a general
query log does not need to be started or an auditing plug-in does not need to be installed at a MySQL
server side, and performance loss caused by log writing is avoided.