I am on a server that has afresh install on RHEL 5. I was able to install Apache and PHP just fine., but I am having serious trouble with my MySQL installation. I tried t
The root of my problem seemed to be selinux, which was turned on (enforcing) automatically on OS install.
I wanted my mysql in /data.
After verifying that my.cnf had:
datadir=/data/mysql
(and leaving the socket at /var/lib/mysql) I executed the command to turn off selinux for mysqld (alternative is to turn it off completely):
setsebool -P mysqld_disable_trans=1
I ran the following commands:
> chown -R mysql .
> chgrp -R mysql .
> mysql_install_db --user=mysql
I started the mysql daemon and everything worked fine after that.