Skip to content
Ripple, a server that can serve as a middleman in MySQL replication
Branch: master
Clone or download
dveeden and pivanof Authenticate client connections with mysql_native_password (#7)
- This only allows one password hash
- This does NOT verify the username
- This won't work for clients that ignore the default authentication method send by the server and are not using mysql_native_password by default. See also: vitessio/vitess#4332 and https://bugs.mysql.com/bug.php?id=93044 . This affects MySQL 8.0 clients as 8.0 always tries to authenticate with caching_sha2_password. The solution is to implement caching_sha2_password over TLS and/or implement AuthSwitchRequest.

Issue: #6

Example use:

$ ./my sql -BNe "SELECT PASSWORD('foobar')"
*9B500343BC52E2911172EB52AE5CF4847604C6E5
$ rippled -ripple_server_password_hash=9B500343BC52E2911172EB52AE5CF4847604C6E5
Latest commit 0b6c9f4 Mar 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial export of Ripple code. Jan 28, 2019
AUTHORS
BUILD.bazel
CONTRIBUTING.md Initial export of Ripple code. Jan 28, 2019
LICENSE Initial export of Ripple code. Jan 28, 2019
README.md ubuntu 18.10 build instructions (#2) Mar 2, 2019
WORKSPACE
binlog.cc Export of Google internal changes to Ripple. Feb 12, 2019
binlog.h Export of Google internal changes to Ripple. Feb 12, 2019
binlog_index.cc Initial export of Ripple code. Jan 28, 2019
binlog_index.h Export of Google internal changes to Ripple. Feb 12, 2019
binlog_index_unittest.cc
binlog_position.cc
binlog_position.h Initial export of Ripple code. Jan 28, 2019
binlog_position_unittest.cc Initial export of Ripple code. Jan 28, 2019
binlog_reader.cc Initial export of Ripple code. Jan 28, 2019
binlog_reader.h Export of Google internal changes to Ripple. Feb 12, 2019
buffer.h
byte_order.h Initial export of Ripple code. Jan 28, 2019
connection.cc
connection.h
encryption.cc Export of Google internal changes to Ripple. Feb 12, 2019
encryption.h
encryption_unittest.cc
executor.cc
executor.h
external_libs.BUILD.bazel
file.h
file_FILE.cc
file_FILE.h Initial export of Ripple code. Jan 28, 2019
file_base.h Export of Google internal changes to Ripple. Feb 12, 2019
file_position.cc Initial export of Ripple code. Jan 28, 2019
file_position.h
file_position_unittest.cc Initial export of Ripple code. Jan 28, 2019
file_unittest.cc
file_util.cc Initial export of Ripple code. Jan 28, 2019
file_util.h
flags.cc Authenticate client connections with mysql_native_password (#7) Mar 18, 2019
flags.h
gtid.cc Export of Google internal changes to Ripple. Feb 12, 2019
gtid.h Initial export of Ripple code. Jan 28, 2019
gtid_unittest.cc
init.cc Fix parsing of flags Feb 6, 2019
init.h
listener.cc
listener.h
log_event.cc
log_event.h Initial export of Ripple code. Jan 28, 2019
log_event_unittest.cc
logging.h
management.proto
management_session.cc Initial export of Ripple code. Jan 28, 2019
management_session.h
manager.cc
manager.h Initial export of Ripple code. Jan 28, 2019
monitoring.cc Initial export of Ripple code. Jan 28, 2019
monitoring.h
my_crypt.cc Initial export of Ripple code. Jan 28, 2019
my_crypt.h
my_crypt_constants.h Initial export of Ripple code. Jan 28, 2019
my_crypt_key_management.cc Initial export of Ripple code. Jan 28, 2019
my_crypt_key_management.h
my_crypt_key_management_impl.cc Initial export of Ripple code. Jan 28, 2019
mysql_client_connection.cc
mysql_client_connection.h Support for password authentication for connecting to a master. Feb 9, 2019
mysql_compat.cc
mysql_compat.h
mysql_constants.cc
mysql_constants.h
mysql_init.cc Export of Google internal changes to Ripple. Feb 12, 2019
mysql_init.h
mysql_master_session.cc
mysql_master_session.h
mysql_protocol.cc
mysql_protocol.h Initial export of Ripple code. Jan 28, 2019
mysql_server_connection.cc
mysql_server_connection.h
mysql_server_port.cc
mysql_server_port.h Initial export of Ripple code. Jan 28, 2019
mysql_server_port_tcpip.cc Initial export of Ripple code. Jan 28, 2019
mysql_server_port_tcpip.h
mysql_server_port_unittest.cc
mysql_slave_session.cc Add support for 'SELECT @@GLOBAL.SERVER_ID' (and same for SERVER_UUID) Feb 4, 2019
mysql_slave_session.h
mysql_util.h Initial export of Ripple code. Jan 28, 2019
plugin.cc.in
plugin.h
purge_thread.cc
purge_thread.h Initial export of Ripple code. Jan 28, 2019
resultset.h Initial export of Ripple code. Jan 28, 2019
rippled.cc
rippled.h
session.cc Initial export of Ripple code. Jan 28, 2019
session.h
session_factory.cc Initial export of Ripple code. Jan 28, 2019
session_factory.h

README.md

Ripple

Ripple is a server that can serve as a middleman in MySQL replication.

The Ripple server connects to a MySQL master the same way a replica would, but rather than creating a copy of the data in MySQL, Ripple just downloads the binlogs and saves them locally. MySQL servers can then be directed to replicate from Ripple instead of the master. Ripple will serve downloaded binlogs to them the same way the master would. This can significantly reduce load on the MySQL master and improve durability of the binlogs.

Ripple supports replication to/from MariaDB and MySQL using GTIDs (of MariaDB and MySQL flavor respectively). Replication using filename and position is not supported. Ripple has been tested with MariaDB 10.0 and MySQL 5.6 and 5.7, but it likely will work with later versions as well.

Build instructions

Following build procedure works on Ubuntu 18.10 cloud image.

Install bazel

apt-get install pkg-config zip g++ zlib1g-dev unzip python libssl-dev default-jdk-headless libmariadbclient-dev
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
apt-get update && sudo apt-get install bazel

Clone source

git clone https://github.com/google/mysql-ripple.git

Build

cd mysql-ripple
bazel build :all
bazel test :all

If all went OK, your binary is at

./bazel-bin/rippled
You can’t perform that action at this time.