LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-09-2005, 01:30 AM   #1
gk_
LQ Newbie
 
Registered: Jul 2004
Location: /home/gk
Distribution: Debian 3.1 Slackware 10.1
Posts: 29

Rep: Reputation: 15
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?

Last edited by gk_; 08-10-2005 at 05:10 AM.
 
Old 08-13-2005, 01:46 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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?
 
Old 08-16-2005, 11:26 PM   #3
gk_
LQ Newbie
 
Registered: Jul 2004
Location: /home/gk
Distribution: Debian 3.1 Slackware 10.1
Posts: 29

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 10:30 AM
starting mysqld zobra Linux - Software 6 12-06-2004 11:27 PM
mysqld doesn't chroot securely markus1982 Linux - Security 12 03-07-2004 08:07 PM
mysqld start linuxRules Linux - General 1 07-21-2002 03:06 PM
Mysqld cinnix Linux - General 4 07-08-2001 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration