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
Home