At 12:15 +0100 7/28/02, Matt Darcy wrote:
>I have copied the file ./support-files/mysql.server to
>I have edited the /etc/init.d/mysql_server to set the basedir to
>/usr/local/mysql and the datadir to /usr/local/mysql/var
>When I compiled mysql I set the --with-mysqld-user=mysqldba flag.
>I run (as root) /etc/init.d/mysql_server start
>$ ps -ef | grep mysql
>mysqldba 20884 20719 0 11:55:31 pts/1 0:00 -ksh
>mysqldba 20880 20865 0 11:55:11 pts/1 0:00
> root 20865 1 0 11:55:11 pts/1 0:00 /bin/sh
>_mysqld --datadir=/usr/local/mysql/var --pid-f
>as you can see the the parent (safe_mysqld)
>sets --datadir=/usr/local/mysql/var (correct)
>however the children processe owned by mysqldba sets datadir=/usr/local/
>???? (why not /usr/local/mysql/var )
>My Questions are..
>Why is the root processes of mysql not owned by mysqldba ? do I need to add
>an su - mysqldba at the start of the mysql_server script ?
root starts safe_mysqld, which starts mysqld, which switches its user ID
to mysqldba. safe_mysqld doesn't changed its ID, which is why it shows
up as root.
>why is mysqld setting --datadir=/usr/locl when the script sets
I suspect what you're seeing is simply an artifact of ps chopping
off output lines. The full command probably is a little different.