diff options
Diffstat (limited to 'support-files/mysql.server.sh')
-rw-r--r-- | support-files/mysql.server.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 545831f93fc..e8d00fee542 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -371,7 +371,13 @@ case "$mode" in else # Try to find appropriate mysqld process mysqld_pid=`pidof $libexecdir/mysqld` - if test -z $mysqld_pid ; then + + # test if multiple pids exist + pid_count=`echo $mysqld_pid | wc -w` + if test $pid_count -gt 1 ; then + log_failure_msg "Multiple MySQL running but PID file could not be found ($mysqld_pid)" + exit 5 + elif test -z $mysqld_pid ; then if test -f "$lock_file_path" ; then log_failure_msg "MySQL is not running, but lock file ($lock_file_path) exists" exit 2 |