mysql 本机主从

作者: admin 分类: linux 发布时间: 2010-10-16 12:46 ė 6 没有评论

 create database pigeon_race default character set utf8 collate utf8_general_ci;
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;

flush privileges;
grant all on *.* to ‘administrator’@’%’ identified by ‘123′;

grant replication slave on *.* to ‘mysql1’@’121.101’ identified by ‘mysql1admin’;

 change master to master_host=’121.’, master_user=’mysql1′, master_password=’mysql1admin’, master_log_file=’mysql-bin.000192′, master_log_pos=4539818;

 /usr/bin/mysql –defaults-file=/etc/my1.cnf -uroot
bin/mysql_install_db  –defaults-file=/etc/my1.cnf –basedir=/usr/local/mysql1 -datadir=/usr/local/mysql1/var –user=mysql1 &
bin/mysqld_safe –defaults-file=/etc/my1.cnf –user=mysql1 &
/usr/bin/mysql –defaults-file=/etc/my.2.cnf -hlocalhost -uroot

本文出自 小Q,转载时请注明出处及相应链接。

本文永久链接: http://www.linuxqq.com/archives/166.html

0
更多
Ɣ回顶部