配置 MySQL Master/Slave 复制
Configuring MySQL Master/Slave Replication
我不明白为什么我尝试将复制主服务器配置为从服务器,但它根本不起作用。我在 Internet 上遵循了一些操作方法。但是,这些中的每一个都会导致在 server2 上启动从属服务器时出错。这是我尝试在 server2(从属)上开始复制的日志的摘录。
131113 13:51:10 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
131113 13:51:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131113 13:51:10 [Note] Plugin 'FEDERATED' is disabled.
131113 13:51:10 InnoDB: The InnoDB memory heap is disabled
131113 13:51:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131113 13:51:10 InnoDB: Compressed tables use zlib 1.2.3
131113 13:51:10 InnoDB: Using Linux native AIO
131113 13:51:10 InnoDB: Initializing buffer pool, size = 128.0M
131113 13:51:10 InnoDB: Completed initialization of buffer pool
131113 13:51:10 InnoDB: highest supported file format is Barracuda.
131113 13:51:10 InnoDB: Waiting for the background threads to start
131113 13:51:11 InnoDB: 5.5.34 started; log sequence number 48943768
131113 13:51:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
131113 13:51:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
131113 13:51:11 [Note] Server socket created on IP: '0.0.0.0'.
131113 13:51:11 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
131113 13:51:11 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this problem.
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
131113 13:51:11 [Note] Event Scheduler: Loaded 0 events
131113 13:51:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.34' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
131113 13:51:11 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000055' at position 16706386, relay log './mysqld-relay-bin.000043' position: 16677244
131113 13:51:11 [Note] Slave I/O thread: connected to master 'slave_user@x.x.x.x:3306',replication started in log 'mysql-bin.000055' at position 16706386
140110 12:07:45 [Note] /usr/libexec/mysqld: Normal shutdown
我希望你们中的一位能帮助我了解如何修复它。谢谢!
在这种情况下,我们必须恢复主数据库和从数据库。由于 policy/management 决定,无法升级。
我不明白为什么我尝试将复制主服务器配置为从服务器,但它根本不起作用。我在 Internet 上遵循了一些操作方法。但是,这些中的每一个都会导致在 server2 上启动从属服务器时出错。这是我尝试在 server2(从属)上开始复制的日志的摘录。
131113 13:51:10 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
131113 13:51:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131113 13:51:10 [Note] Plugin 'FEDERATED' is disabled.
131113 13:51:10 InnoDB: The InnoDB memory heap is disabled
131113 13:51:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131113 13:51:10 InnoDB: Compressed tables use zlib 1.2.3
131113 13:51:10 InnoDB: Using Linux native AIO
131113 13:51:10 InnoDB: Initializing buffer pool, size = 128.0M
131113 13:51:10 InnoDB: Completed initialization of buffer pool
131113 13:51:10 InnoDB: highest supported file format is Barracuda.
131113 13:51:10 InnoDB: Waiting for the background threads to start
131113 13:51:11 InnoDB: 5.5.34 started; log sequence number 48943768
131113 13:51:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
131113 13:51:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
131113 13:51:11 [Note] Server socket created on IP: '0.0.0.0'.
131113 13:51:11 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
131113 13:51:11 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this problem.
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
131113 13:51:11 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
131113 13:51:11 [Note] Event Scheduler: Loaded 0 events
131113 13:51:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.34' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
131113 13:51:11 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000055' at position 16706386, relay log './mysqld-relay-bin.000043' position: 16677244
131113 13:51:11 [Note] Slave I/O thread: connected to master 'slave_user@x.x.x.x:3306',replication started in log 'mysql-bin.000055' at position 16706386
140110 12:07:45 [Note] /usr/libexec/mysqld: Normal shutdown
我希望你们中的一位能帮助我了解如何修复它。谢谢!
在这种情况下,我们必须恢复主数据库和从数据库。由于 policy/management 决定,无法升级。