Mysql replication: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Grigor (Diskussion | Beiträge) |
Grigor (Diskussion | Beiträge) |
||
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
== start.bat == | == start.bat == | ||
− | <code> | + | <code>set path=e:\IntraSell\MySQL\mysql-5.5.28-winx64\bin;%path% |
− | |||
mysqld --defaults-file="e:\IntraSell\MySQL\mysql-5.5.28-winx64\my.ini" | mysqld --defaults-file="e:\IntraSell\MySQL\mysql-5.5.28-winx64\my.ini" | ||
− | pause | + | pause</code> |
− | </code> | ||
== my.conf == | == my.conf == | ||
− | <code> | + | <code>server-id=3 |
− | |||
log-bin= | log-bin= | ||
log-slave-updates | log-slave-updates | ||
slave-skip-errors=all | slave-skip-errors=all | ||
− | binlog-format=row | + | binlog-format=row</code> |
− | </code> | + | |
− | Commands | + | ==Commands == |
<code>STOP SLAVE; | <code>STOP SLAVE; | ||
</code> | </code> | ||
+ | |||
+ | ==Set Replication == | ||
<code> | <code> | ||
CHANGE MASTER TO | CHANGE MASTER TO | ||
Zeile 31: | Zeile 30: | ||
START SLAVE; | START SLAVE; | ||
</code> | </code> | ||
− | Full syntax | + | == Full syntax == |
+ | <code> | ||
CHANGE MASTER TO option [, option] ... [ channel_option ] | CHANGE MASTER TO option [, option] ... [ channel_option ] | ||
Zeile 68: | Zeile 68: | ||
server_id_list: | server_id_list: | ||
[server_id [, server_id] ... ] | [server_id [, server_id] ... ] | ||
+ | </code> |
Aktuelle Version vom 28. April 2019, 22:18 Uhr
MYSQL Replcation, Cheat sheets
Inhaltsverzeichnis
start.bat
set path=e:\IntraSell\MySQL\mysql-5.5.28-winx64\bin;%path%
mysqld --defaults-file="e:\IntraSell\MySQL\mysql-5.5.28-winx64\my.ini"
pause
my.conf
server-id=3
log-bin=
log-slave-updates
slave-skip-errors=all
binlog-format=row
Commands
STOP SLAVE;
Set Replication
CHANGE MASTER TO
MASTER_HOST = 'host_name',
MASTER_USER = 'user_name',
MASTER_PASSWORD = 'password',
MASTER_PORT = port_num,
MASTER_LOG_FILE = 'master_log_name',
MASTER_LOG_POS = master_log_pos;
START SLAVE;
Full syntax
CHANGE MASTER TO option [, option] ... [ channel_option ]
option:
MASTER_BIND = 'interface_name'
| MASTER_HOST = 'host_name'
| MASTER_USER = 'user_name'
| MASTER_PASSWORD = 'password'
| MASTER_PORT = port_num
| MASTER_CONNECT_RETRY = interval
| MASTER_RETRY_COUNT = count
| MASTER_DELAY = interval
| MASTER_HEARTBEAT_PERIOD = interval
| MASTER_LOG_FILE = 'master_log_name'
| MASTER_LOG_POS = master_log_pos
| MASTER_AUTO_POSITION = {0|1}
| RELAY_LOG_FILE = 'relay_log_name'
| RELAY_LOG_POS = relay_log_pos
| MASTER_SSL = {0|1}
| MASTER_SSL_CA = 'ca_file_name'
| MASTER_SSL_CAPATH = 'ca_directory_name'
| MASTER_SSL_CERT = 'cert_file_name'
| MASTER_SSL_CRL = 'crl_file_name'
| MASTER_SSL_CRLPATH = 'crl_directory_name'
| MASTER_SSL_KEY = 'key_file_name'
| MASTER_SSL_CIPHER = 'cipher_list'
| MASTER_SSL_VERIFY_SERVER_CERT = {0|1}
| MASTER_TLS_VERSION = 'protocol_list'
| MASTER_PUBLIC_KEY_PATH = 'key_file_name'
| GET_MASTER_PUBLIC_KEY = {0|1}
| IGNORE_SERVER_IDS = (server_id_list)
channel_option:
FOR CHANNEL channel
server_id_list:
[server_id [, server_id] ... ]