Changes between Version 1 and Version 2 of MySqlReplication
- Timestamp:
- Oct 13, 2010, 3:06:10 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MySqlReplication
v1 v2 1 1 2 This page describes the replication of a MySql server database. 2 3 3 4 = Objectives = 4 The database named {{ps1sc}} is present on the host {{neverland}}. We want to replicate it on the host named {{biglefts}}. {{neverland}} will be the master, {{biglefts}}its slave.5 The database named ''ps1sc'' is present on the host ''neverland''. We want to replicate it on the host named ''biglefts''. ''neverland'' will be the master, ''biglefts'' its slave. 5 6 6 7 = Preliminary = … … 19 20 20 21 = Set up the master configuration for replication = 21 All commands are executed on the master ( {{neverland}})22 All commands are executed on the master (''neverland'') 22 23 Documentation is at http://dev.mysql.com/doc/refman/5.1/en/replication-howto-masterbaseconfig.html 23 * Stop the mysql server: {{sudo service mysql stop}}24 * Note: {{ps waux | grep mysqld}}should not show anything (except the grep part maybe)25 * Edit the mysql configuration and add (or uncomment+modify) the {{[mysqld]}}section so that it contains:24 * Stop the mysql server: ''sudo service mysql stop'' 25 * Note: ''ps waux | grep mysqld'' should not show anything (except the grep part maybe) 26 * Edit the mysql configuration and add (or uncomment+modify) the ''[mysqld]'' section so that it contains: 26 27 {{{ 27 28 log-bin=/var/log/mysql/mysql-bin.log … … 33 34 sync_binlog=1 34 35 }}} 35 * Start the mysql server: {{sudo service mysql start}}36 * Start the mysql server: ''sudo service mysql start'' 36 37 37 38 = Set up the slave configuration for replication = 38 All commands are executed on the slave ( {{biglefts}})39 All commands are executed on the slave (''biglefts'') 39 40 Documentation is at http://dev.mysql.com/doc/refman/5.1/en/replication-howto-slavebaseconfig.html 40 * Stop the mysql server: {{sudo service mysql stop}}41 * Note: {{ps waux | grep mysqld}}should not show anything (except the grep part maybe)42 * Edit the mysql configuration and add (or uncomment+modify) the {{[mysqld]}}section so that it contains:41 * Stop the mysql server: ''sudo service mysql stop'' 42 * Note: ''ps waux | grep mysqld'' should not show anything (except the grep part maybe) 43 * Edit the mysql configuration and add (or uncomment+modify) the ''[mysqld]'' section so that it contains: 43 44 {{{ 44 45 server-id=2010101302 … … 48 49 log-bin=/var/log/mysql/mysql-bin.log 49 50 }}} 50 * Start the mysql server: {{sudo service mysql start}}51 * Start the mysql server: ''sudo service mysql start'' 51 52 52 53 = Create a User for Replication =
