Question

I'm not a MySQL expert, it's late and my eyes are batty. Now, with that out of the way... Something's going screwy on this server and I'm wondering if maybe it's the fact that there are two versions of MySQL on it and the old one (which is supposed to be dormant) is somehow coming back to life.

I'm not sure I'm reading this output (below) correctly... There are two mysql entries...but I can't be certain they're both part of a normal healthy MySQL installation.

usr/local/mysql/bin/mysqld is the new version and should be running...

but what is ./bin/mysqld_safe? I don't recall this process running before we installed the new version...though could be wrong.

The old (factory installed) version is in /usr/bin and I want to make sure it's not running...

$ ps -e | grep mysql
50870 ttys003    0:00.08 /bin/sh ./bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/server.mydomain.com.pid
50979 ttys003    0:00.39 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --log-error=/usr/local/mysql/data/server.mydomain.com.err --pid-file=/usr/local/mysql/data/server.mydomain.com.pid --socket=/var/mysql/mysql.sock --port=3306
Was it helpful?

Solution

No, this is normal. On Unix, a running MySQL instance will have two processes, as listed in your example.

mysqld is the server binary; mysqld_safe is a launcher script for mysqld (hence it is shown as being run by /bin/sh in your output).

mysqld_safe is the recommended way to start a mysqld server on Unix and NetWare. mysqld_safe adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log file.

(man mysqld_safe, or http://dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html ).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top