I am running MySQL on CentOS. When I attempt to start it gives an error but in the background 2 processes are started:


$ sudo service mysqld stop
[sudo] password for arifu: 
Redirecting to /bin/systemctl stop  mysqld.service

$ ps -aux | grep mysql
arifu    20332  0.0  0.0 112620   744 pts/0    S+   13:08   0:00 grep --color=auto mysql


$ sudo service mysqld start
Redirecting to /bin/systemctl start  mysqld.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.


$ systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: deactivating (final-sigterm) (Result: exit-code)
Process: 17465 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 17443 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysqld.service
        └─17468 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid...

$ ps -aux | grep mysql
mysql    17798  0.0  0.0  53032  3620 ?        Ss   13:03   0:00 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
mysql    17800 89.6  6.7 39831592 3308524 ?    Rl   13:03   0:02 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
arifu    17826  0.0  0.0 112620   744 pts/0    S+   13:04   0:00 grep --color=auto mysql

None of these can be used:

$ mysql -h localhost -u root -p mysql
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Any idea?


I managed to trace the problem to wrong configuration - join_buffer & malloc-lib:


I had copied these when I migrated from MySQL 5.6 but it appears they no longer work for 5.7

1 Answer 1


The name of the first one is join_buffer_size. And 256K (not M) has been the default since 5.6.6. Using 256M is likely to blow out RAM all too easily. This would either slow down mysqld (due to swapping) or crash it (out of memory).

I don't know about the .so, but I would certainly suspect it.

As for 2 processes -- On some Operating systems, several processes, the number based on some configuration values, probably thread_cache_size and max_connections, plus usage patterns.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.