If you have downloaded the source package then you will need to compile the MySQL Proxy before using it. To build you will need to have the following installed:
libevent 1.x or higher (1.3b or later is preferred)
lua 5.1.x or higher
glib2 2.6.0 or higher
pkg-config
libtool 1.5 or higher
MySQL 5.0.x or higher developer files
On some operating systems you may need to manually build the required components to get the latest version. If you are having trouble compiling MySQL Proxy then consider using one of the binary distributions.
Once these components are installed, you need to configure and then build:
shell> tar zxf mysql-proxy-0.7.2
.tar.gz shell> cd mysql-proxy-0.7.2
shell> ./configure shell> make
If you want to test the build, then use the
check
target to make:
shell> make check
The tests try to connect to localhost
using
the root
user. If you need to provide a
password, set the MYSQL_PASSWORD
environment
variable:
shell> MYSQL_PASSWORD=root_pwd make check
You can install using the install
target:
shell> make install
By default mysql-proxy is installed into
/usr/local/sbin/mysql-proxy
. The Lua
example scripts are copied into
/usr/local/share
.