Warning: Computer must have enough free space for enabling bin-log.
Don't worry about your historical data, this tool could sync these via other way.
binlog_format
AND binlog_row_image
are very important,MUST be ROW
and FULL
:
log_bin=mysql-bin
binlog_format=ROW
binlog_row_image=FULL
explicit_defaults_for_timestamp=true
log-slave-updates=1
; MUST set a server-id, this tool used the 1001+ for slave-id
server-id=1
The user MUST had these privileges:
SELECT, SHOW VIEW, Reload, REPLICATION SLAVE, REPLICATION CLIENT
Create a user like this:
CREATE USER 'canal'@'%' IDENTIFIED BY 'Your Password';
GRANT SELECT, SHOW VIEW, Reload, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'canal'@'%';
FLUSH PRIVILEGES;
Java 1.8+
CentOS/Redhat
yum install java java-devel
Fedora
dnf -y install \
java-1.8.0-openjdk \
java-1.8.0-openjdk-devel
-
Goto release page, and download the newest stable version.
filename like:
mysql_es-x.x.x-release.zip
. -
Unzip it.
-
Goto
mysql_es
folder. -
Set
config/config.json
,config/river.json
.See Settings page
-
Add
X
permission to file:chmod +x bin/me.sh
, -
bin/me.sh start
-
all usages:
bin/me.sh start|stop|restart|info|status
Delete the mysql_es
folder.