mysql innobackupex 的一則錯誤

e71hao發表於2016-08-16
-bash-3.2$ ./innobackupex --version-check /usr/mysql/xtraback/xtrabackup03
InnoDB Backup Utility v1.5.1-xtrabackup; 
150930 17:16:26  innobackupex: Executing a version check against the server...
150930 17:16:26  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' (using password: NO).
innobackupex: got a fatal error with the following stacktrace: at ./innobackupex line 3006
        main::mysql_connect('abort_on_error', 1) called at ./innobackupex line 1551
innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at ./innobackupex line 3006.
150930 17:16:26  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' (using password: NO).
innobackupex: got a fatal error with the following stacktrace: at ./innobackupex line 3006
        main::mysql_connect('abort_on_error', 1) called at ./innobackupex line 1570
innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at ./innobackupex line 3006.

報這樣一個錯誤。這個錯誤原因是innobackupex是用perl語言寫的,perl要透過perl DBI模組和DBD-mysql模組呼叫mysql資料庫來執行。
所以,需要安裝包perl-DBD-MySQL。安裝這個包,會遇到錯誤:
yum install perl-DBD-MySQL。採用這個命令安裝會出現如下錯誤:
Transaction Check Error:
  file /etc/my.cnf from install of mysql-5.0.77-4.el5_5.4.i386 conflicts with file from package MySQL-server-5.6.25-1.linux_glibc2.5.i386
原因是:perl-DBD-MySQL對應了5.0版本的mysql,而你安裝的5.6的版本mysql。解決辦法是手動安裝DBD。
請參考我的文章 http://blog.itpub.net/30393770/viewspace-1813513/  。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30393770/viewspace-2123583/,如需轉載,請註明出處,否則將追究法律責任。

相關文章