You a ps -aeLf | grep mysqld
You should get something like this:
Code:
UID PID PPID LWP C NLWP STIME TTY TIME CMD
root 958 1 958 0 1 14:38 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql 5196 958 5196 0 1 14:38 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
mysql 30966 5196 30966 0 1 14:38 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
mysql 10776 30966 10776 0 1 14:38 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
mysql 1036 30966 1036 0 1 14:38 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root 4024 8245 4024 0 1 14:46 pts/2 00:00:00 grep mysqld
Now, following this you can see /usr/bin/mysqld_safe was executed (PID 958). This in turn called mysqld (PID 5196). That mysqld called another mysqld (PID 30966) which in turn called two more mysqld's (PID 10776 and 1036). You can tell this because PPID shows you the parent process.
Now the mysqld_safe in my case was has a parent of PID 1, which is init, which usually means it was executed by the init scripts.
The reason mysql works starts multiple processes/threads is because it can run more efficiently that way.