mysql数据库主从配置
http://blog.csdn.net/l1028386804/article/details/48413681 错误分析
https://www.cnblogs.com/fyc119/p/7529902.html 主从配置
测试了下主从分离的配置,基本是成功了,先记录下流程
192.168.1.101主机配置
192.168.1.101的主机配置 windows环境 [client] port=3306 [mysql] default-character-set=utf8 [mysqld] port=3306 basedir="D:/phpStudy/MySQL/" datadir="D:/phpStudy/MySQL/data/" character-set-server=utf8 default-storage-engine=MyISAM #支持 INNODB 引擎模式。修改为 default-storage-engine=INNODB 即可。 #如果 INNODB 模式如果不能启动,删除data目录下ib开头的日志文件重新启动。 sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" max_connections=512 query_cache_size=0 table_cache=256 tmp_table_size=18M thread_cache_size=8 myisam_max_sort_file_size=64G myisam_sort_buffer_size=35M key_buffer_size=25M read_buffer_size=64K read_rnd_buffer_size=256K sort_buffer_size=256K innodb_additional_mem_pool_size=2M innodb_flush_log_at_trx_commit=1 innodb_log_buffer_size=1M innodb_buffer_pool_size=47M innodb_log_file_size=24M innodb_thread_concurrency=8 log-bin=D:\phpStudy\MySQL\data\mysqllog-bin.log server-id=10
192.168.1.91丛机配置 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-grant-tables user=mysql symbolic-links=0 tmpdir=/tmp server_id=2 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/lib/mysql/mysqld.pid log-bin = /var/lib/mysql/solve-bin.log CHANGE MASTER TO MASTER_HOST=192.168.1.101 MASTER_USER=root MASTER_PASSWORD=root
其它的都是按照网址上的流程操作的,此时的话主机上面添加数据已经可以在从机上面显示了。