设为首页 加入收藏

TOP

MySQL主从复制配置-windows单机环境(三)
2014-11-24 03:28:33 来源: 作者: 【 】 浏览:2
Tags:MySQL 主从 复制 配置 -windows 单机 环境
s use zlib 1.2.3 2014-03-26 22:21:19 6916 [Note] InnoDB: Not using CPU crc32 instructions 2014-03-26 22:21:19 6916 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2014-03-26 22:21:19 6916 [Note] InnoDB: Completed initialization of buffer pool 2014-03-26 22:21:19 6916 [Note] InnoDB: Highest supported file format is Barracuda. 2014-03-26 22:21:20 6916 [Note] InnoDB: 128 rollback segment(s) are active. 2014-03-26 22:21:20 6916 [Note] InnoDB: Waiting for purge to start 2014-03-26 22:21:20 6916 [Note] InnoDB: 5.6.16 started; log sequence number 1625977 2014-03-26 22:21:20 6916 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: e6f98904-b4f1-11e3-9ec5-904ce5e379cc. 2014-03-26 22:21:20 6916 [Note] Server hostname (bind-address): '*'; port: 3311 2014-03-26 22:21:20 6916 [Note] IPv6 is available. 2014-03-26 22:21:20 6916 [Note] - '::' resolves to '::'; 2014-03-26 22:21:20 6916 [Note] Server socket created on IP: '::'. 2014-03-26 22:21:21 6916 [Note] Event Scheduler: Loaded 0 events 2014-03-26 22:21:21 6916 [Note] mysqld: ready for connections. Version: '5.6.16' socket: '' port: 3311 MySQL Community Server (GPL) 7.将slave连接到master上 现在创建基本的复制只剩最后一步了:将slave指向master,让它知道从哪里进行复制,为此你需要知道master的4个信息:主机名,主机端口号,主机数据库用户,主机数据库帐号密码,因为创建master的时候已经创建了一个复制用户,因此在slave节点上执行如下指令:
mysql> change master to master_host='localhost',master_port=3310,master_user='repl_user',master_password='111111'; Query OK, 0 rows affected, 2 warnings (0.45 sec) mysql>
mysql> start slave; Query OK, 0 rows affected (0.05 sec) mysql>
8.常见问题排查 执行如上命令后,输出如下信息: 2014-03-26 23:11:23 6916 [ERROR] Slave I/O: error connecting to master 'repl_user@localhost:3310' - retry-time: 60 retries: 1, Error_code: 1045 这个说明slave和master之间的链接没有建立成功,这个时候多半是添加了新用户repl_user后,没有生效导致 在master上执行flush privileges;来将新建的用户及权限生效
首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇mysql给表添加字段的命令 下一篇mysql常用语句

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·数据库:推荐几款 Re (2025-12-25 12:17:11)
·如何最简单、通俗地 (2025-12-25 12:17:09)
·什么是Redis?为什么 (2025-12-25 12:17:06)
·对于一个想入坑Linux (2025-12-25 11:49:07)
·Linux 怎么读? (2025-12-25 11:49:04)