A solution to the problem of MySQL proxy _mysql

Source: Internet
Author: User
Tags time interval
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:

Old_password = 1

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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.