Percona MySQL 5.7 | XtraBackup 2.4 - xb_load_tablespaces() failed witherror code 11 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 - &gt; /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 &amp;&amp; touch test.txt"
su -s /bin/bash databacker -c "cd /var/lib/mysql &amp;&amp; touch test.txt"


What am I missing?
I had a similar issue with an upgrade where I ended up with mixed libraries. Make sure you don't have dated library files still out there. I had to completely uninstall MySQL and reinstall it from scratch, and then it worked.