slave:端使用源码安装MySQL 5.5版本 软件后,在/etc/my.cnf配置文件[ mysqld]段中加入如下代码,然后重启 MySQL服务即可,如果在安装时 cp my-large.cnf /etc/my.cnf,则需修改 server-id, master与 slave端 server-id不能一样,slave端无须开启 bin-log功能,代码如下:
server-id= 2
slave端/etc/my.cnf完整配置代码如下:
[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
skip-external-locking
key_buffer_size=256MB
max_allowed_packet=1MB
table_open_cache=256
sort_buffer_size=1MB
read_buffer_size=1MB
read_rnd_buffer_size=4MB
myisam_sort_buffer_size=64MB
thread_cache_size=8
query_cache_size= 16MB
thread_concurrency=8
server-id=2
[mysqldump]
quick
max_allowed_packet=16MB
no-auto-rehash
[myisamchk]
key_buffer_size=128MB
sort_buffer_size= 128MB
read_buffer=2MB
write_buffer=2MB
[mysqlhotcopy]
interactive- timeout
为
slave安装及配置
最新推荐文章于 2023-06-26 18:45:32 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)