Mysql
移動 mysql 從站
我正在嘗試將 MySQL slave 從舊電腦移到新電腦。原始從站是 MySQL 5.6.12 版,與新從站相同(MySQL 是 wamp 2.4 的一部分)。複製在舊機器上工作正常。但是當我停止奴隸時,將數據文件夾和 my.ini 複製到 new 並嘗試啟動 wamp 我得到:
`2015-12-20 17:07:40 144 [Note] Plugin 'FEDERATED' is disabled. 2015-12-20 17:07:40 144 [Note] InnoDB: The InnoDB memory heap is disabled 2015-12-20 17:07:40 144 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2015-12-20 17:07:40 144 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-12-20 17:07:40 144 [Note] InnoDB: Not using CPU crc32 instructions 2015-12-20 17:07:40 144 [Note] InnoDB: Initializing buffer pool, size = 1.0G 2015-12-20 17:07:40 144 [Note] InnoDB: Completed initialization of buffer pool 2015-12-20 17:07:40 144 [Note] InnoDB: Highest supported file format is Barracuda. 2015-12-20 17:07:40 144 [Note] InnoDB: The log sequence numbers 3737360739086 and 3737360739086 in ibdata files do not match the log sequence number 3737360743076 in the ib_logfiles! 2015-12-20 17:07:40 144 [Note] InnoDB: Database was not shutdown normally! 2015-12-20 17:07:40 144 [Note] InnoDB: Starting crash recovery. 2015-12-20 17:07:40 144 [Note] InnoDB: Reading tablespace information from the .ibd files... 2015-12-20 17:07:49 144 [Note] InnoDB: Restoring possible half-written data pages 2015-12-20 17:07:49 144 [Note] InnoDB: from the doublewrite buffer... InnoDB: Last MySQL binlog file position 0 191213785, file name .\mysql-bin.000337 2015-12-20 17:07:52 144 [Note] InnoDB: 128 rollback segment(s) are active. 2015-12-20 17:07:53 144 [Note] InnoDB: Waiting for purge to start 2015-12-20 17:07:53 144 [Note] InnoDB: 5.6.12 started; log sequence number 3737360743076 2015-12-20 17:07:53 144 [ERROR] Aborting 2015-12-20 17:07:53 144 [Note] Binlog end 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'partition' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_FIELDS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_INDEXES' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_SYS_TABLES' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_FT_CONFIG' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_FT_DELETED' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_METRICS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_CMPMEM' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_CMP_RESET' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_CMP' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_LOCK_WAITS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_LOCKS' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'INNODB_TRX' 2015-12-20 17:07:53 144 [Note] Shutting down plugin 'InnoDB' 2015-12-20 17:07:53 144 [Note] InnoDB: FTS optimize thread exiting. 2015-12-20 17:07:53 144 [Note] InnoDB: Starting shutdown... 2015-12-20 17:07:54 144 [Note] InnoDB: Shutdown completed; log sequence number 3737360748271 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'BLACKHOLE' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'ARCHIVE' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'MRG_MYISAM' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'MyISAM' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'MEMORY' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'CSV' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'sha256_password' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'mysql_old_password' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'mysql_native_password' 2015-12-20 17:07:54 144 [Note] Shutting down plugin 'binlog' 2015-12-20 17:07:54 144 [Note]
而這一切。執行 mysqld-debug :
2015-12-20 17:26:01 2896 [Note] Plugin 'FEDERATED' is disabled. 2015-12-20 17:26:01 2896 [Note] InnoDB: The InnoDB memory heap is disabled 2015-12-20 17:26:01 2896 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2015-12-20 17:26:01 2896 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-12-20 17:26:01 2896 [Note] InnoDB: Not using CPU crc32 instructions 2015-12-20 17:26:01 2896 [Note] InnoDB: Initializing buffer pool, size = 1.0G 2015-12-20 17:26:01 2896 [Note] InnoDB: Completed initialization of buffer pool 2015-12-20 17:26:01 2896 [Note] InnoDB: Highest supported file format is Barracuda. 2015-12-20 17:26:06 2896 [Note] InnoDB: 128 rollback segment(s) are active. 2015-12-20 17:26:06 2896 [Note] InnoDB: Waiting for purge to start 2015-12-20 17:26:06 2896 [Note] InnoDB: 5.6.12 started; log sequence number 3737360748271 2015-12-20 17:26:06 2896 [Note] Server hostname (bind-address): '*'; port: 3307 2015-12-20 17:26:06 2896 [Note] IPv6 is available. 2015-12-20 17:26:06 2896 [Note] - '::' resolves to '::'; 2015-12-20 17:26:06 2896 [Note] Server socket created on IP: '::'.
然後我連接到數據庫,執行查詢’SHOW SLAVE STATUS’:
Slave_IO_STATE:Connecting to master LAST_IO_ERRNO:2003 Last_IO_ERROR:error connecting to master 'repl@192.168.1.9:3306' - retry-time: 60 retries: 5
防火牆已關閉,主 IP 可用(ping 有效)。我想知道,出了什麼問題 - 正常 wamp 啟動服務失敗,沒有錯誤號,mysqld-debug 無法連接到主伺服器。
當奴隸在原始虛擬機上執行沒有任何問題時,會出現什麼問題?感謝所有的答案。
儘管日誌沒有提到它,但 MySQL 錯過了 errmsg.sys 文件。這是在 Windows 事件查看器中提到的。複製errmsg.sys後,一切正常,slave執行正常。
您是否更新了授權以允許新的從屬連接?