Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

mysql not started @ server boot automatically but I can start manually as long as log as user "mysql" by using "/etc/init.d/mysql.server" the error I got on the log is

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 name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

so the question is how I can give permission for "root" and mysql start @ boot.

Thanks in advance for any help. p.

share|improve this question

migrated from stackoverflow.com Aug 14 '11 at 22:22

This question came from our site for professional and enthusiast programmers.

2 Answers 2

Most likely your mysql data directory is not owned by the mysql user, so it has no permissions to work with its own files. You'll have to figure out where the InnoDB data directory is (innodb_data_file_path setting), then rummage around in that file/directory and fix the permissions. You'd probably want mode 700 on those, since nothing but mysql should ever have access to them.

share|improve this answer
    
first thanks for your response.I am not using InnoDB tables. so I don't have such file. also every file on mysql directory own by "mysql" user –  Dan Aug 9 '11 at 19:02
    
yes, but InnoDB is enabled and trying to create its data files (of which ibdata1 is one), even if there's no actual data going into it. –  Marc B Aug 9 '11 at 19:28
    
"ibdata1" is located /opt/mysql/data directory own by "mysql" and has permission"660" so are you suggesting me to change the permission for ibdata1 from 660 to 700 ? thanks again!! –  Dan Aug 9 '11 at 20:14

easy way to find out mysql errors s with perror

$ perror 13
OS error code  13:  Permission denied
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.