CHroot MySQL
Posted by:
Ethan Moie
Date: April 24, 2007 09:40AM
Ahh jeez,
it's been a tough last couple of days.......
I've been installing mod_chroot on a LAMP server.
Chrooting apache and PHP is not a problem, the issue is MySQL, Once I get it running I can't connect to the backend database.
I have done this so far...
Quote:
# mkdir -p /var/www/var/run
# chown -R root.root /var/www/var/run
# nano /etc/apache2/httpd.conf:
PidFile /var/run/httpd.pid
ChrootDir /var/www
DocumentRoot /
# ln -s /var/www/var/run/httpd.pid /var/run/httpd.pid
I have also edited php.ini to make sure open_basedir is also correct.
I then did this:
Quote:
cd /var/chroot/apache/var/run
mkdir mysqld
chown mysql:mysql /var/chroot/apache/var/run/mysqld
then
Quote:
nano /etc/mysql/my.cnf
[client]
socket = /var/www/var/run/mysqld/mysqld.sock
[server]
socket = /var/www/var/run/mysqld/mysqld.sock
/etc/init.d/mysql restart
nano /root/.bashrc
alias mysql="mysql -S /var/chroot/apache/var/run/mysqld/mysqld.sock"
To allow apache to connect to MySQl from a file wihtin the jail. However MySQL choked and died.
Can anyone shine a light on this?
Edit/Delete Message
Subject
Views
Written By
Posted
CHroot MySQL
8580
April 24, 2007 09:40AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.