I faced the same problem on Linux Mint 17.2 (Ubuntu based) distro and KDE, MySQL 5.5.
I identified two problems:
- Using a terminal in KDE I'm not able to stop and start the mysql service and I got the error:
Unknown job: mysql
;
- I got an error in the log
Can't start server, Bind on unix socket: Permission denied
, mysql had no permission to create the mysqld socket and the mysql process fails to start.
The first 'KDE related' problem is a Mystery, I suppose it is related to the Akonadi service using his own mysqld instance. The solution is.. let's work out of KDE, directly using a textual shell (pressing CTRL-ALT-F?), in this way I was able to start and stop the mysql service (service mysql start/stop).
The second one, in my case, was caused by wrong Apparmor configurations, I suggest to check inside the /etc/apparmor.d folder and look for these files:
./local/usr.sbin.mysqld
./usr.sbin.mysqld
They may be lacking or may contain errors (yes, apparmor mis-configuration or they have been damaged), in my case I changed the two configuration files in this way:
./usr.sbin.mysqld
# vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include <tunables/global>
/usr/sbin/mysqld {
#include <abstractions/base>
#include <abstractions/nameservice>
#include <abstractions/user-tmp>
#include <abstractions/mysql>
#include <abstractions/winbind>
capability dac_override,
capability sys_resource,
capability setgid,
capability setuid,
network tcp,
/etc/hosts.allow r,
/etc/hosts.deny r,
/etc/mysql/*.pem r,
/etc/mysql/conf.d/ r,
/etc/mysql/conf.d/* r,
/etc/mysql/*.cnf r,
/usr/lib/mysql/plugin/ r,
/usr/lib/mysql/plugin/*.so* mr,
/usr/sbin/mysqld mr,
/usr/share/mysql/** r,
/var/log/mysql.log rw,
/var/log/mysql.err rw,
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
/var/lib/mysql-files/ r,
/var/lib/mysql-files/** rwk,
/var/log/mysql/ r,
/var/log/mysql/* rw,
/var/run/mysqld/mysqld.pid rw,
/var/run/mysqld/mysqld.sock w,
/run/mysqld/mysqld.pid rw,
/run/mysqld/mysqld.sock w,
/sys/devices/system/cpu/ r,
# Site-specific additions and overrides. See local/README for details.
#include <local/usr.sbin.mysqld>
}
./local/usr.sbin.mysqld
# Site-specific additions and overrides for usr.sbin.mysqld.
# For more details, please see /etc/apparmor.d/local/README.
/var/lib/mysql/** rwk,
/var/log/mysql/ r,
/var/log/mysql/* rw,
/{,var/}run/mysqld/mysqld.pid w,
/{,var/}run/mysqld/mysqld.sock w,
/sys/devices/system/cpu/ r,
/home/manolinux/.opentpv/** rw,
I applied the major changes to the ./local/usr.sbin.mysqld configuration file.
Please note that you have to adapt them to the paths in your current distro/enviromet.
In conclusion, the mysql error may be due to strange KDE "interactions" or Apparmor misconfiguration. Very important: in case, do not use a KDE terminal to start/stop the mysql service.
Hope useful