我的Master的位置没有更新,我已经查看了我能找到的所有其他复制问题的帖子...还是不走运。下面是我得到的信息:
Master /etc/my.cnf
[mysqld]
server-id = 1
log-bin = /var/log/mysql/binary.log
binlog_do_db = securityDB从/etc/my.cnf
[mysqld]
server-id = 2
master-host = 192.168.1.130
master-port = 3306
master-user = slave
master-password = slave
replicate-do-db = securityDB主机上的processlist显示备机已连接:
*************************** 4. row ***************************
Id: 86
User: root
Host: localhost:59948
db: securitydb
Command: Sleep
Time: 350
State:
Info: NULL
*************************** 5. row ***************************
Id: 138
User: root
Host: localhost
db: securitydb
Command: Query
Time: 0
State: NULL
Info: show processlist
*************************** 6. row ***************************
Id: 187
User: slave
Host: macbookpro17:59477
db: NULL
Command: Binlog Dump
Time: 600
State: Master has sent all binlog to slave; waiting for binlog to be updated
Info: NULL
The slave process list shows that it's connected to the master:
*************************** 5. row ***************************
Id: 532
User: root
Host: localhost
db: securitydb
Command: Sleep
Time: 689
State:
Info: NULL
*************************** 6. row ***************************
Id: 922
User: system user
Host:
db: NULL
Command: Connect
Time: 715
State: Waiting for master to send event
Info: NULL
*************************** 7. row ***************************
Id: 923
User: system user
Host:
db: NULL
Command: Connect
Time: 714
State: Slave has read all relay log; waiting for the slave I/O thread to update it
Info: NULL像‘%bin%’这样的主变量:
+-----------------------------------------+----------------------+
| Variable_name | Value |
+-----------------------------------------+----------------------+
| binlog_cache_size | 32768 |
| binlog_direct_non_transactional_updates | OFF |
| binlog_format | STATEMENT |
| binlog_stmt_cache_size | 32768 |
| innodb_locks_unsafe_for_binlog | OFF |
| log_bin | ON |
| log_bin_trust_function_creators | OFF |
| max_binlog_cache_size | 18446744073709547520 |
| max_binlog_size | 1073741824 |
| max_binlog_stmt_cache_size | 18446744073709547520 |
| sql_log_bin | ON |
| sync_binlog | 0 |
+-----------------------------------------+----------------------+从变量,如'%bin%':
+-----------------------------------------+--------------------------------+
| Variable_name | Value |
+-----------------------------------------+--------------------------------+
| bind_address | * |
| binlog_cache_size | 32768 |
| binlog_checksum | CRC32 |
| binlog_direct_non_transactional_updates | OFF |
| binlog_format | STATEMENT |
| binlog_max_flush_queue_time | 0 |
| binlog_order_commits | ON |
| binlog_row_image | FULL |
| binlog_rows_query_log_events | OFF |
| binlog_stmt_cache_size | 32768 |
| innodb_api_enable_binlog | OFF |
| innodb_locks_unsafe_for_binlog | OFF |
| log_bin | ON |
| log_bin_basename | /var/lib/mysql/mysql-bin |
| log_bin_index | /var/lib/mysql/mysql-bin.index |
| log_bin_trust_function_creators | OFF |
| log_bin_use_v1_row_events | OFF |
| max_binlog_cache_size | 18446744073709547520 |
| max_binlog_size | 1073741824 |
| max_binlog_stmt_cache_size | 18446744073709547520 |
| sql_log_bin | ON |
| sync_binlog | 0 |
+-----------------------------------------+--------------------------------+但是主位置没有移动,复制被卡住了。我注意到数据库在进程列表中以所有小写字母显示,但我已将replicate_do_db更改为全部小写,这没有任何帮助。数据库名称实际上是securityDB。我已经尝试了主重置,从重置,创建新的bin日志...没有什么能把我带到那里。我相信这是很简单的..。
任何建议都将不胜感激。
发布于 2014-01-22 16:04:13
更改/etc/ mysql /my.cnf文件后,需要重新启动mysql服务器。
该命令为:
service mysqld restarthttps://stackoverflow.com/questions/19602073
复制相似问题