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
========================================================================
Solution.
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]#

Yo.!

2 comments:

Satya said...

Thanks for the post. It solved my problem.

Renu said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
Devops Training in electronic city