Not the answer you need?
Register and ask your own question!

Error: option 'datadir' has different values

src386src386 EntrantCurrent User Role Participant
Hi everyone,
I'm running percona-xtrabackup in a test environment and I'm getting that weird error :
innobackupex: Error: option 'datadir' has different values:
'/var/lib/mysql' in defaults file
'/var/lib/mysql/' in SHOW VARIABLES

Here is the full output :
[email protected]:~# innobackupex --host=10.10.25.163 --user=percona --password=mypassword /data/percona/db/

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p

150713 17:26:04 innobackupex: Executing a version check against the server...
150713 17:26:04 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=10.10.25.163' as 'percona' (using password: YES).
150713 17:26:04 innobackupex: Connected to MySQL server
150713 17:26:04 innobackupex: Done.
150713 17:26:04 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=10.10.25.163' as 'percona' (using password: YES).
150713 17:26:04 innobackupex: Connected to MySQL server
150713 17:26:04 innobackupex: Starting the backup operation

IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".

innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 3692
main::init() called at /usr/bin/innobackupex line 1574
innobackupex: Error: option 'datadir' has different values:
'/var/lib/mysql' in defaults file
'/var/lib/mysql/' in SHOW VARIABLES

I created a local file percona.cnf with the following line :
datadir         = /var/lib/mysql/

Then ran innobackupex :
innobackupex --host=10.10.25.163 --user=percona --password=mypassword --defaults-file=percona.cnf /data/percona/db/

But know I get this :
[...]
xtrabackup: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file or directory)
xtrabackup: cannot my_setwd /var/lib/mysql/

What can I do ?

Thanks

Xavier C.

Comments

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.