Category: MySQLProxy

MySQL Proxy FAQ

Contents


MySQL Proxy Frequently Asked Questions

Frequently asked questions about MySQL Proxy

Compiling and installing

General features

In load balancing, how can I separate reads from writes?

Q. Is a backend-server a remote mysql machine ? You would think so, but from another post in this forum, it looks like the separation of reads from writes has not been implemented yet, so I am not clear as to the distinction between backend-servers and read-only servers.

$ mysql-proxy \
--proxy-backend-addresses=10.0.1.2:3306 \
--proxy-backend-addresses=10.0.1.3:3306 &

I don't see how this works for writes, as they kind of have to go one place.

A. Currently (0.6.0) there is no separation between read and writes and it is up the user to make sure that only reads are sent to the proxy.

In the next releases we will add connection pooling and read/write splitting to make this more useful.


Command line options

How do I use a socket with MySQL Proxy?

Q. Proxy change logs say added support for UNIX sockets

How to use it? I can't see any --proxy-socket=</path/to/socket> option in `mysql-proxy --help-proxy` nor in sources.


A. just

--proxy-backend-addresses=/path/to/socket

However it appears that --proxy-address=</path/to/socket> does not work on the front end. It would be nice if someone added this feature.

How do I run the Proxy as a daemon?

Q. Can I run the Proxy as a daemon?

A. Starting from version 0.6.0, the Proxy is launched as a daemon by default.

If you want to avoid this, use the -D --no-daemon option

To keep track of the process ID, the daemon can be started with the additional option --pid-file=<file>, to save the PID to a known file name.

On version 0.5.x, the Proxy can't be started natively as a daemon


Scripting


UNDER CONSTRUCTION


Retrieved from "http://forge.mysql.com/wiki/MySQL_Proxy_FAQ"

This page has been accessed 4,992 times. This page was last modified 19:35, 22 October 2007.

Find

Browse
MySQLForge
Main Page
Current events
Recent changes
Random page
Help
Edit
View source
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Special pages
New pages
File list
Statistics
Bug reports
More...