Tuesday, June 8, 2010

/usr/libexec/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13) [Resolved]

If you want's to change mysql default data directory or apart of /var/lib/mysql and for this setting you are facing this type of issue:
/usr/libexec/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13)
100607 16:57:44 [ERROR] Aborting

100607 16:57:44 [Note] /usr/libexec/mysqld: Shutdown complete

100607 16:57:44 mysqld ended
Just Do.

mysql_install_db --user=mysql --ldata=/data/mysql
mysqld_safe --datadir=/data/mysql --user=mysql &

[root@321 mysql]# /etc/init.d/mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
[root@dh119sj mysql]#