MySQL 版本:4.1
环境介绍:主库 192.168.0.205 从库 192.168.0.206
1、主库创建/etc/my.cnf,修改[mysqld]里边的键值增加
server-id=1
log-bin=binlog_name
2、主库增加用户,用于从库读取主库日志。
grant replication slave,reload,super on *.* to
’slave’@’192.168.0.206’ identified by ’123456’
3、从库连接主库进行测试。
/opt/mysql/bin/mysql -u slave -p -h 192.168.0.205
4、停从库,修改从库/etc/my.cnf,增加选项:
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号