Unable to connect to MySQL through MySQL proxy
If the host and password are correct, you may encounter a problem where you cannot connect to MySQL. Check whether the MySQL server uses old_password and whether there is a problem in my. CNF.
Plain text
Code:CopyCodeThe Code is as follows: old_password = 1
Some databases are upgraded from the old version, so this option is enabled. MySQL proxy does not support old_password. You can also check the password length to determine the password length:
Plain text
Code:Copy codeThe Code is as follows: Select length (password) from mysql. User
If the length is 16 bits, It is the old_password.
Garbled characters
After connecting to the database through the proxy, the query string is always garbled, even if you manually execute set names 'utf8', it will not work.
Solution: MySQL server must be set
Plain text
Code:Copy codeThe Code is as follows: [mysqld]
Skip-character-set-client-handshake
Init-connect = 'set names utf8'
Default-character-set = utf8
When a MySQL slave is disabled, the MySQL proxy reports an error and all MySQL instances cannot be connected.
MySQL proxy is installed for read/write splitting, including master x 1 and slave x 2. In order to test the Failover, a server Load balancer instance is stopped, and MySQL proxy always reports an error, prompting that the connection fails. This is worse than single-point mysql. If one is dropped, it will all be dropped! MySQL engineers provided a piece of code to replace the network_mysqld_plugin_proto function of SRC/network-mysqld-proxy.c to solve this problem.
The code is relatively long, directly attached: network-mysqld-proxy-function.c
Regular crash
This problem is also very bad. MySQL proxy often stops working quietly. Fortunately, the interval is very long. I guess there is a memory leakage problem. I hope it can be solved in later versions.
The solution I use is to restart it regularly at night.