InnoDB: Operating system error number 13 in a file operation.

If you get this error, then here is the fix…

071202 14:52:11 mysqld started
071202 14:52:11 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.
071202 14:52:11 mysqld ended

First update your my.cnf file for innoDB support

#> cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf

Then update your paths in my.cnf

#> vi /etc/my.cnf

Look for these lines, uncomment and change the paths

innodb_data_home_dir = /usr/local/mysql/data/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/db/mysql/
innodb_log_arch_dir = /usr/local/mysql/data/

And now fix your permissions on the DATA directory.

#>chown -R mysql:mysql /usr/local/mysql

All set


Enterprise Architect High Availability Cloud / Distributive Computing Testing Automation Continuous Automation Enterprise planning Resource management Hardware design Data center management (FreeBSD, Suse, Windows Server) Network management Scripting (PHP,ASP,C#,JS,Python, PERL,HTML,XML,XSLT, AS,CSS,DHTML) Database Design/Management (MySQL, PostgresQL, Oracle, MS SQL, Access, Oracle) Server/Network security (Cisco, Layer 2, Smart Switching, Active Directory) Technical writer Technology consulting Audio production Digital design Print design Web design Video production Production director Multimedia design My business edge unites "business with technology" in a revenue generating fashion. I have been consulting/developing internet applications for 9+ for several internet firms. I am currently in my third term as a CTO for a design firm in Marina Del Rey. [A few books I have read] The Big Five, The Root of Chinese QiGong, Lateral Puzzles,Internet Future Technologies (Pervasive Internet Technologies),Business Plans that Work (Harvard Book for Business Plans),A Brief History in Time (Classic Steven Hawking),E-Beyond (Internet Marketing),Strategic Project Management (Enterprise Project Management)

Leave a Reply