基础环境:CentOS release 5.4 (Final),并且通过yum安装的mysql-server; data文件路径从默认的/var/lib/mysql调整到/data/mysql,需修改以下几个配置文件: 1,/etc/my.cnf [mysqld] datadir=/data/mysql socket=/data/mysql/mysql.sock 2,/etc/init
1,主库配置 [root@AAA test]# more /etc/my.cnf [mysqld] log-bin=mysql-bin server-id=1 2,主库创建用户 GRANT REPLICATION SLAVE ON *.* TO 'MYTEST'@'%' identified by 'password'; 3,从库配置 [
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号