Unable to connect MySQL via MySQL proxy
In the case of Host,password correct, you will also encounter the inability to connect to MySQL, you can check whether the MySQL server is using Old_password, check my.cnf inside is not there
PLAIN TEXT
CODE:
Copy Code code as follows:
Some databases are upgraded from older versions, so this option is turned on, and MySQL proxy does not support Old_password. You can also judge by how long the password is:
PLAIN TEXT
CODE:
Copy Code code as follows:
Select Length (password) from Mysql.user
If the length is 16 bits is old_password undoubtedly.
character garbled
By proxy connected to the database, the found string is always garbled, even if the manual implementation of the set names ' UTF8 ' also has no effect.
Workaround, MySQL server must set up
PLAIN TEXT
CODE:
Copy Code code as follows:
[Mysqld]
Skip-character-set-client-handshake
init-connect= ' SET NAMES UTF8 '
Default-character-set=utf8
A MySQL slave when lost, MySQL proxy will be the error cause all MySQL can not connect
MySQL proxy is installed to achieve read-write separation, with Master x 1, slave x 2. To test failover, a slave is stopped, and then the MySQL proxy keeps an error and prompts that it cannot be connected. This situation is worse than the single point of MySQL, hang off a whole! The MySQL engineer provides a piece of code that replaces the SRC/NETWORK-MYSQLD-PROXY.C Network_mysqld_plugin_proto function to solve the problem.
The code is relatively long, directly attached download address: NETWORK-MYSQLD-PROXY-FUNCTION.C
Regular crash
This problem is also very bad, MySQL proxy often quietly stop their work, fortunately, the time interval is very long. Guess there is a memory leak problem exists, I hope later versions can be resolved.
The solution I'm using is to restart it regularly at night.