|
Free Stuff: links: Neue Surf Tips : know-how : Zitate : Spam Strike : HTML Checker! : Link Checker : Cartoons About IC: friends: lust und frust : guestbook : what's new |
|
MySQL database server
selber erfolgreich ausprobieren :-)
Die nachfolgende
getestete Umgebung scheint mir realistisch:
Ein "alter"
Master 3.23 und ein "junger" Slave 4.0.
(c) by retoh :))
Q: How to replicate full database "retoh" to another
Server?
A: see below
[Master (3.23.56)]
shell> vi /etc/my.cnf
# -- add these two lines within the [mysqld] section if they would not be present
yet:
log-bin
server-id=1
mysql> GRANT FILE ON *.* TO repl@"%" IDENTIFIED BY '
mysql> GRANT REPLICATION SLAVE ON *.* TO repl@"%" IDENTIFIED BY '
# -- backup database 'retoh'
# -- stop mysql daemon (for sure ;-)
shell> tar -cvf /tmp/retoh-db.tar /var/lib/mysql/retoh [Slave (4.0.13)]
shell> cd /tmp
shell> scp root@yourhost.com:/tmp/retoh-db.tar .
# -- untar the database files
shell> tar -xf tar -xf retoh-db.tar shell> cd /var/lib/mysql/ shell> mv /tmp/var/lib/mysql/retoh .
shell> cp -p /usr/share/mysql/my-medium.cnf /etc/my.cnf
shell> /etc/rc.d/init.d/mysql stop shell> /etc/rc.d/init.d/mysql start
mysql> CHANGE MASTER TO MASTER_HOST='212.97.98.99', MASTER_PORT=3306,
MASTER_USER='your_replication_user', MASTER_PASSWORD='your_password';
mysql> start slave;
Eine Übersicht, welche Versionen
mit welcher Replikationstechnisch
kompatibel wären, fändest du
unter
Related MySQL Documentation: mysql.com/doc/en/Replication.html |
|||||||
|
Know-How home
| Must Read
| What's new?
| iC Site Map link search |
©1998-2004 infoCopter
|