Bug #70717 Operation system error number 13 in a file operation
Submitted: 24 Oct 2013 1:22 Modified: 12 Dec 2013 19:10
Reporter: wolf wolf Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:5.6 OS:Linux (CentOS, Fedora)
Assigned to: CPU Architecture:Any
Tags: data directory

[24 Oct 2013 1:22] wolf wolf
Description:
I had set the access right for this directory to 777 using the following command:
chown -R 777 mysql:mysql /home/mysqldata

And the right description is "drwxrwxrwx" for the directory /home/mysqldata after I use the linux command "ll".

Now, I want to locate my table data file to the directory /home/mysqldata, and the test script to create table is:
create table tb1(id int, title varchar(100), primary key(id)) engine = innodb, data directory = '/home/mysqldata';

The mysql server returns: 
ERROR 1030 (HY000): Got error -1 from storage engine

And the error log shows:
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to 
InnoDB: the directory.

InnoDB: File /home/mysqldata/test: 'mkdir' returned OS error 113.

Why have no access right to the directory? I had set all the right for the directory to all users!

How to repeat:
hemowolf@hotmail.com
[12 Nov 2013 19:10] MySQL Verification Team
Check for SELinux Issue. Thanks.
[13 Dec 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".