January 1, 2019

MySQL mysqlreplicate cheatsheet

mysqlreplicate utility commands in MySQL

mysqlreplicate    Establish replication with a master

MySQL Database Administrators (DBAs) use mysqlreplicate utility to setup/start replication from MySQL master to slave.

Usage: mysqlreplicate --master=root@localhost:3306 --slave=root@localhost:3310 --rpl-user=rpl:passwd

mysqlreplicate --help
mysqlreplicate --version

mysqlreplicate --master=host1 --slave=host2 --rpl-user=rpluser
mysqlreplicate --master=root:password@server1 --slave=root: password@server2 --rpl-user=replication_user:password

mysqlreplicate --master=master1 --slave=linux1 --rpl-user=sysdba --pedantic
mysqlreplicate --master=linux1 --slave=slave1 --rpl-user=root -v --pedantic

mysqlreplicate --master=master1 --slave=slave1 --rpl-user=dba --pedantic --quiet
mysqlreplicate --master=replication@server1:3306 --slave=replication@server4:3306 --rpl-user=root -vv --pedantic

mysqlreplicate --master=root:password@server1:3310 --slave=root: password@server2:3310 --rpl-user=replication_user:password --verbose -p
mysqlreplicate --master=root@localhost:3306 --slave=root@localhost:3307 --rpl-user=rpl:rpl --master-log-file=mysql_log.000006 --master-log-pos=333


mysqlreplicate --master=linux1 --slave=slave1 --rpl-user=root -v --start-from-beginning

mysql replicate options:
  --version            show program's version number and exit
  --help                display a help message and exit
  --license              display program's license and exit
  --master=MASTER       connection information for master server in the form: user[:password]@host[:port][:socket] or login-path[:port][:socket] or config- path[[group]].
  --slave=SLAVE          connection information for slave server in the form: user[:password]@host[:port][:socket] or login-path[:port][:socket] or config- path[[group]].
  --rpl-user=RPL_USER   the user and password for the replication user requirement, in the form: user[:password] or login-path. e.g. rpl:passwd

  -p, --pedantic        fail if storage engines differ among master and slave.
  --test-db=TEST_DB      database name to use in testing replication setup (optional).
  --master-log-file=MASTER_LOG_FILE use this master log file to initiate the slave.
  --master-log-pos=MASTER_LOG_POS use this position in the master log file to initiate the slave.
  -b, --start-from-beginning start replication from the first event recorded in the binary logging of the master. Not valid with --master- log-file or --master-log-pos.

  --ssl-ca=SSL_CA        path to a file that contains a list of trusted SSL CAs.
  --ssl-cert=SSL_CERT    name of the SSL certificate file to use for  establishing a secure connection.
  --ssl-key=SSL_KEY      name of the SSL key file to use for establishing a secure connection.
  --ssl=SSL              specifies if the server connection requires use of SSL. If an encrypted connection cannot be established, the connection attempt fails. By default 0 (SSL not required).

  -v, --verbose          control how much information is displayed. e.g., -v =verbose, -vv = more verbose, -vvv = debug.
  -q, --quiet            turn off all messages for quiet execution.

Related MySQL Articles: MySQL mysqlfailover utility commands


No comments:

Post a Comment