LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   chroot mysqld (https://www.linuxquestions.org/questions/linux-security-4/chroot-mysqld-351398/)

gk_ 08-09-2005 01:30 AM

chroot mysqld
 
running a minimal install Debian Sarge w/ Mysql-server-4.1 installed

I am trying to have mysql run in a chroot. and for the most part it seems i have done it but when i run

lsof|grep mysql
Code:

mysqld    3253      mysql  mem      REG        3,1    33440      22394 /var/chroot/mysql/lib/tls/libnss_nis.so.2
mysqld    3253      mysql  mem      REG        3,1    34748      22395 /var/chroot/mysql/lib/tls/libnss_files.so.2
mysqld    3253      mysql    0u      CHR      136,1                  3 /dev/pts/1
mysqld    3253      mysql    1u      CHR      136,1                  3 /dev/pts/1
mysqld    3253      mysql    2u      CHR      136,1                  3 /dev/pts/1
mysqld    3253      mysql    3u    IPv4      6606                TCP 192.168.0.155:mysql (LISTEN)
mysqld    3253      mysql    4u    unix 0xdec46340                6608 /var/run/mysqld/mysqld.sock
mysqld    3253      mysql    5w      REG        3,1      79      19341 /var/chroot/mysql/var/log/mysql/mysql-bin.000022
mysqld    3253      mysql    6u      REG        3,1      704      22399 /var/chroot/mysql/var/log/mysql/mysql-bin.index

and it show everythign is form the chroot expet for /dev/pts and /var/run/mysqld/mysqld.sock but when i "ls /var/run/mysql" it is empty should this be of any concern or is there sonething that has gone wrong here?

bigrigdriver 08-13-2005 01:46 AM

If nothing shows up, I suggest the possibility that the mysql server is not running.

I just tried it on SuSE, which puts it all in /var/lib, instead of /var/run. It worked fine, AFTER I ran /usr/bin/mysql_safe (to start the mysql server), then ran updatedb, then ran 'ls /var/lib/mysql/mysql.sock". It was all there.

So. The question I have to ask is, did you start the mysql server?

gk_ 08-16-2005 11:26 PM

:D Yes. I did. And it runs fine. I can start and stop it. I can access the database from localy and remotely. So everythign seems like it is working

except that lsof shows /var/run/mysqld/mysqld.sock
my concern is that it is opened from /var/chroot/mysqld/var/run...
and when i do an ls of /var/run/mysqld. the file mysqld.sock is not there.

other then the mysqld.sock issue, which is vexing, i do not have any problems with it. well none i can see at the moment.


All times are GMT -5. The time now is 06:48 AM.