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;来将新建的用户及权限生效
|