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

Percona MySQL 5.7 | XtraBackup 2.4 - xb_load_tablespaces() failed witherror code 11

shouttag_mikeshouttag_mike EntrantCurrent User Role Beginner
I am attempting to upgrade MySQL from 5.6 to 5.7 and everything seems to be working, but when I try to run xtrabackup I am now getting this error:

InnoDB: Allocated tablespace ID 12 for percona/checksums, old maximum was 0
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to the directory.
xtrabackup: error: xb_load_tablespaces() failed witherror code 11

Nothing has changed, mysql user perms, system user perms, directory perms, nor structure, but now I am seeing this error. I cannot replicate the problem when I run the command as root, so it leads me to believe it is a system permission issue.

I temporarily disabled selinux to remove it as a distractor. I also granted ALL to the databacker mysql user in case it was a new permission that I was missing.

Here is the command I use:

su -s /bin/bash databacker -c "innobackupex --user=databacker --password=p4ssw0rd --socket=/var/lib/mysql/mysql.sock --stream=tar /tmp | gzip - > /tmp/wtf.tgz"

I tested perms as the databacker user and it all seems to work as expected:

su -s /bin/bash databacker -c "cd /tmp && touch test.txt"
su -s /bin/bash databacker -c "cd /var/lib/mysql && touch test.txt"

What am I missing?

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.