In the mysql-proxy read_auth method, replace the username and password in the mysql-proxy read_auth method to replace the username and password sent from the client with the real user name and password, for example, replace reapcript/me with root/root. The most important part is to call the to_response_packet method to generate a data packet and send it to the database for verification. Mysql-proxy 0.8.3 is written in the following Java code: proxy. queries: append (1, proto. to_response_packet ({username = "root", response = password. scramble (s. scramble_buffer, password. hash ("secret")}) return proxy. PROXY_SEND_QUERY added the server_capabilities attribute to the mysql-0.8.3 version of the api, and the above Program reported the following error message: Java code :. server_capabilities has to be set must be rewritten to the following form: Java code: local protocol_41_default_capabilities = 8 + 512 + 32768 -- 8 + --_ CONNECT_WITH_DB -- 512 + -- _ PROTOCOL_41 -- 32768 -- _ SECURE_CONNECTION Java code: proxy. queries: append (1, proto. to_response_packet ({username = "root", response = password. scramble (scramble_buffer, password. hash ("root"), server_capabilities = protocol_41_default_capabilities}) was troubled by this problem for three or four days and finally solved.