Hi, I see that the 2.0 version has support for casual read, and the wiki mentions a ProxySQL Binlog Reader. I don't seam to be able to find it and there is no doc on how to use it.
I would gladly write some doc if you can provide some guidance, at least on where to find it.
Hi, I have installed it successfully and my system is centos7+mysql5.7.
these steps below may give you some help.
step1 download
shell> git clone https://github.com/sysown/proxysql_mysqlbinlog.git
step2 Install basic
shell> yum install gcc gcc-c++
step3 try to install libslave
shell> cd libslave && mkdir build && cd build
step4.1 if error and it tells no boost
shell> wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz
shell> tar -xzvf boost_1_69_0.tar.gz && cd boost_1_69_0
shell> ./bootstrap.sh
shell> ./b2
shell> cp -rf boost /usr/include/.
shell> cp -rf stage/lib/* /usr/lib64/.
step5 prepare mysql basic
shell> cp /usr/local/mysql/lib/libmysqlclient.so /usr/lib/libmysqlclient.so
Shell> ln -s /usr/local/mysql/include /usr/include/mysql
Shell> wget https://github.com/mysql/mysql-server/archive/mysql-5.6.42.tar.gz
Shell> cd mysql-server-mysql-5.6.42
Shell> cp hash.h /usr/include/mysql/.
step6 back to build directory and try again
Shell> cmake ..
Shell> make && make install
step7 install proxysql_binlog_reader
Shell> make
Shell> make install
step8 test
Shell> ./proxysql_binlog_reader
Usage: ./proxysql_binlog_reader -h <mysql host> -u <mysql user> -p <mysql password> -P <mysql port> -l <listen port> -L <log file>
Shell> ./proxysql_binlog_reader -hlocalhost -uroot -p123456 -P3306 -l888 -L /usr/local/mysql/binlog.pos
Shell> lsof -i:888
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
proxysql_ 38627 root 4u IPv4 94406 0t0 TCP *:cddbp (LISTEN)
Shell> ps -ef|grep proxysql
root 38626 1 0 10:45 ? 00:00:00 ./proxysql_binlog_reader -hlocalhost -uroot -pxxxxxx -P3306 -l888 -L /usr/local/mysql/binlog.pos
root 38627 38626 0 10:45 ? 00:00:00 ./proxysql_binlog_reader -hlocalhost -uroot -pxxxxxx -P3306 -l888 -L /usr/local/mysql/binlog.pos
Shell> tail -f /usr/local/mysql/binlog.pos
Starting ProxySQL MySQL Binlog
Sucessfully started
Angel process started ProxySQL MySQL Binlog process 39348
2019-02-26 19:36:30 [INFO] Initializing client...
2fc7e507-3921-11e9-9db9-000c29ae6412:1-3
2019-02-26 19:36:30 [INFO] Reading binlogs...
If someone is from the ubuntu camp, this is a lot easier
shell> git clone https://github.com/sysown/proxysql_mysqlbinlog.git
cd proxysql_mysqlbinlog
sudo apt-get install docker.io
make ubuntu16
It will download rene docker repo and pull all the software dependencies.
I'm trying to test out the binlog reader on ubuntu 18.04 with a fresh install.
Install mysql 8.0.0.16 - when asked to use the new or old authentication i chose legacy. (mysql is hosted on ubuntu not docker)
Use mysql admin api to configured the local mysql instance and set necessary variables in my.cnf
Using hellracer instructions to create the docker image.
Navigate into docker container:
./proxysql_binlog_reader -h10.0.1.2 -uroot -p123456 -P3306 -l888 -L /usr/local/mysql/binlog.pos
Getting error
Myslave: error reading packet from server: malformed gtid set encoding
It would be nice to have documentation that works with a completely fresh install
Most helpful comment
If someone is from the ubuntu camp, this is a lot easier
shell> git clone https://github.com/sysown/proxysql_mysqlbinlog.git
cd proxysql_mysqlbinlog
sudo apt-get install docker.io
make ubuntu16
It will download rene docker repo and pull all the software dependencies.