2009/7/6 Amadeus W.M. <amadeus84@xxxxxxxxxxx>: > Trying to run mysqld with datadir=/data/mysql (i.e. different than the > default datadir=/var/lib/mysql). When I start mysqld for the first time it > fails: > > [root@alm ~]# /etc/rc.d/init.d/mysqld start > Initializing MySQL database: Installing MySQL system tables... > 090705 23:01:52 [Warning] Can't create test file /data/mysql/alm.lower-test > 090705 23:01:52 [Warning] Can't create test file /data/mysql/alm.lower-test > /usr/libexec/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13) > 090705 23:01:52 [ERROR] Aborting <snip> > chcon -R -u system_u -r object_r -t mysqld_db_t /home/mysqldb > chcon -R -u system_u -r object_r -t mysqld_db_t /var/lib/mysql/ > chcon -u system_u -r object_r -t mysqld_etc_t /etc/my.cnf > > with /data/mysql instead of /home/mysqldb, of course. It might be better to do this instead of the first line: chcon -R --reference=/var/lib/mysql /data/mysql Lines 2 and 3 should be unnecessary if mysql works with the default data dir already. -- Sam -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines