程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> xtrabackup: Error: Please set parameter datadir,innobackup

xtrabackup: Error: Please set parameter datadir,innobackup

編輯:MySQL綜合教程

xtrabackup: Error: Please set parameter 'datadir',innobackupex: fatal error: no 'mysqld' group in解決   -- 報錯:

[[email protected]]#  innobackupex  --rsync --user=backupusertmp --password=backupusertmp  /mysqldata/shared/tmpbackup
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012.  All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
130716 10:38:27  innobackupex: Starting mysql with options:  --password=xxxxxxxx --user='backupusertmp' --unbuffered --
130716 10:38:27  innobackupex: Connected to database with mysql child process (pid=6083)
130716 10:38:33  innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".
innobackupex: Using mysql  Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

xtrabackup: Error: Please set parameter 'datadir'
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options

 

解決辦法: 添加
--defaults-file=/opt/mysql/product/5.5.25a/my.cnf
參數  
[[email protected]]#  innobackupex  --rsync --user=backupusertmp --password=backupusertmp --defaults-file=/opt/mysql/product/5.5.25a/my.cnf  /mysqldata/shared/tmpbackup
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012.  All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
130716 10:44:29  innobackupex: Starting mysql with options:  --defaults-file='/opt/mysql/product/5.5.25a/my.cnf' --password=xxxxxxxx --user='backupusertmp' --unbuffered --
130716 10:44:29  innobackupex: Connected to database with mysql child process (pid=6595)
130716 10:44:35  innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".
innobackupex: Using mysql  Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
innobackupex: Error: Failed to create backup directory /mysqldata/shared/tmpbackup/2013-07-16_10-44-35: No such file or directory at /usr/bin/innobackupex line 371.

 

看到文件目錄不存在,所以mkdir目錄
[[email protected]]# mkdir /mysqldata/shared/tmpbackup/
[[email protected]]#  innobackupex  --rsync --user=backupusertmp --password=backupusertmp --defaults-file=/opt/mysql/product/5.5.25a/my.cnf  /mysqldata/shared/tmpbackup
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012.  All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
130716 10:46:24  innobackupex: Starting mysql with options:  --defaults-file='/opt/mysql/product/5.5.25a/my.cnf' --password=xxxxxxxx --user='backupusertmp' --unbuffered --
130716 10:46:24  innobackupex: Connected to database with mysql child process (pid=6780)
130716 10:46:30  innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".
innobackupex: Using mysql  Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

 

開始復制進行 .................

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved