I heard about mysqlproxy for the first time.

Source: Internet
Author: User
Mysqlproxy was the first time I heard this word in a new project. Can anyone tell me why I want to use him. We did this in the previous master-slave database. There is a way to execute the SQL statement to him every time, and then he chooses whether to connect to the master database or slave database, if the first six letters contain s... mysql proxy was the first time I heard this word in a new project. Can anyone tell me why I want to use him.
We did this in the previous master-slave database. There is a way to execute the SQL statement to him every time, and then he chooses whether to connect to the master database or slave database, if the first six letters contain select, read the slave database. If not, read the master database.
But I heard this word today. Why should I use it for read/write splitting? Or is our previous practice wrong? mysql proxy is usually used for read/write splitting?

Reply content:

Mysql proxy was the first time I heard this word in a new project. Can anyone tell me why I want to use him.
We did this in the previous master-slave database. There is a way to execute the SQL statement to him every time, and then he chooses whether to connect to the master database or slave database, if the first six letters contain select, read the slave database. If not, read the master database.
But I heard this word today. Why should I use it for read/write splitting? Or is our previous practice wrong? mysql proxy is usually used for read/write splitting?

Read/write splitting and load balancing

You don't need to write it yourself.
To implement read/write splitting by yourself, many things that need to be considered are actually not applicable to various situations simply by checking the select statement. for example: for update
If you do not want to use mysql proxy and you only need to check the select statement to meet your requirements. The mysqlnd_ms extension in php can effectively solve the read/write splitting problem.

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.