配置MySQL主/从复制

问题描述 投票:0回答:1

我不知所措,为什么我尝试将复制主服务器配置为从属服务器,但这根本行不通。我遵循了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 '[email protected]:3306',replication started in log 'mysql-bin.000055' at position 16706386
140110 12:07:45 [Note] /usr/libexec/mysqld: Normal shutdown

我希望你们中的一个可以帮助我了解如何解决它。谢谢!

mysql database-replication
1个回答
0
投票

在这种情况下,我们必须还原主数据库和从数据库。由于政策/管理决策,无法选择升级。

© www.soinside.com 2019 - 2024. All rights reserved.