When I tried to restart mysql
sudo /etc/init.d/mysql restart
it failed with
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]


When I look on logs

abokov@abokov-desktop:~/workspace$ cat /var/log/syslog | grep mysql
Nov 26 16:27:00 abokov-desktop kernel: [170182.545486] type=1503 audit(1259242020.517:38): operation="open" pid=2389 parent=2388 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:00 abokov-desktop kernel: [170182.569015] type=1503 audit(1259242020.537:39): operation="open" pid=2412 parent=2411 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:09 abokov-desktop kernel: [170191.876228] type=1503 audit(1259242029.847:40): operation="open" pid=2443 parent=2442 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:09 abokov-desktop kernel: [170191.904002] type=1503 audit(1259242029.877:41): operation="open" pid=2465 parent=2464 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:10 abokov-desktop kernel: [170192.922070] type=1503 audit(1259242030.898:42): operation="open" pid=2479 parent=2478 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:11 abokov-desktop kernel: [170193.934072] type=1503 audit(1259242031.907:43): operation="open" pid=2493 parent=2492 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:12 abokov-desktop kernel: [170194.946164] type=1503 audit(1259242032.917:44): operation="open" pid=2506 parent=2504 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:13 abokov-desktop kernel: [170195.958097] type=1503 audit(1259242033.927:45): operation="open" pid=2518 parent=2517 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:14 abokov-desktop kernel: [170196.971246] type=1503 audit(1259242034.940:46): operation="open" pid=2530 parent=2529 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:37 abokov-desktop kernel: [170219.816901] type=1503 audit(1259242057.790:47): operation="open" pid=2611 parent=2610 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:37 abokov-desktop kernel: [170219.838551] type=1503 audit(1259242057.810:48): operation="open" pid=2646 parent=2645 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:38 abokov-desktop kernel: [170220.850100] type=1503 audit(1259242058.819:49): operation="open" pid=2664 parent=2663 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:39 abokov-desktop kernel: [170221.863211] type=1503 audit(1259242059.837:50): operation="open" pid=2681 parent=2680 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:40 abokov-desktop kernel: [170222.875600] type=1503 audit(1259242060.847:51): operation="open" pid=2696 parent=2695 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:41 abokov-desktop kernel: [170223.889044] type=1503 audit(1259242061.857:52): operation="open" pid=2712 parent=2711 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:42 abokov-desktop kernel: [170224.900148] type=1503 audit(1259242062.877:53): operation="open" pid=2725 parent=2724 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:43 abokov-desktop kernel: [170225.913407] type=1503 audit(1259242063.887:54): operation="open" pid=2738 parent=2737 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:44 abokov-desktop kernel: [170226.925696] type=1503 audit(1259242064.898:55): operation="open" pid=2756 parent=2755 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:45 abokov-desktop kernel: [170227.939230] type=1503 audit(1259242065.908:56): operation="open" pid=2768 parent=2767 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:46 abokov-desktop kernel: [170228.950973] type=1503 audit(1259242066.919:57): operation="open" pid=2781 parent=2780 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:27:47 abokov-desktop kernel: [170229.966242] type=1503 audit(1259242067.939:58): operation="open" pid=2795 parent=2794 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:01 abokov-desktop kernel: [170243.172113] type=1503 audit(1259242081.148:59): operation="open" pid=2852 parent=2851 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:01 abokov-desktop kernel: [170243.180296] type=1503 audit(1259242081.148:60): operation="open" pid=2861 parent=2860 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:01 abokov-desktop kernel: [170243.204843] type=1503 audit(1259242081.178:61): operation="open" pid=2876 parent=2875 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:01 abokov-desktop kernel: [170243.228242] type=1503 audit(1259242081.198:62): operation="open" pid=2897 parent=2896 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:02 abokov-desktop kernel: [170244.240555] type=1503 audit(1259242082.207:63): operation="open" pid=2910 parent=2909 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:03 abokov-desktop kernel: [170245.254419] type=1503 audit(1259242083.227:64): operation="open" pid=2922 parent=2921 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:04 abokov-desktop kernel: [170246.266424] type=1503 audit(1259242084.238:65): operation="open" pid=2934 parent=2933 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:05 abokov-desktop kernel: [170247.278603] type=1503 audit(1259242085.247:66): operation="open" pid=2946 parent=2945 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:06 abokov-desktop kernel: [170248.294050] type=1503 audit(1259242086.267:67): operation="open" pid=2960 parent=2958 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:07 abokov-desktop kernel: [170249.306342] type=1503 audit(1259242087.277:68): operation="open" pid=2973 parent=2972 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:08 abokov-desktop kernel: [170250.326067] type=1503 audit(1259242088.297:69): operation="open" pid=2985 parent=2984 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:09 abokov-desktop kernel: [170251.341483] type=1503 audit(1259242089.317:70): operation="open" pid=2997 parent=2996 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:10 abokov-desktop kernel: [170252.356864] type=1503 audit(1259242090.327:71): operation="open" pid=3009 parent=3008 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:11 abokov-desktop kernel: [170253.369503] type=1503 audit(1259242091.337:72): operation="open" pid=3021 parent=3020 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:12 abokov-desktop kernel: [170254.383041] type=1503 audit(1259242092.357:73): operation="open" pid=3033 parent=3032 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:13 abokov-desktop kernel: [170255.395428] type=1503 audit(1259242093.367:74): operation="open" pid=3045 parent=3044 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:14 abokov-desktop kernel: [170256.406868] type=1503 audit(1259242094.377:75): operation="open" pid=3057 parent=3056 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:15 abokov-desktop kernel: [170257.418552] type=1503 audit(1259242095.387:76): operation="open" pid=3069 parent=3068 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov 26 16:28:15 abokov-desktop /etc/init.d/mysql[3085]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Nov 26 16:28:15 abokov-desktop /etc/init.d/mysql[3085]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Nov 26 16:28:15 abokov-desktop /etc/init.d/mysql[3085]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Nov 26 16:28:15 abokov-desktop /etc/init.d/mysql[3085]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Nov 26 16:28:15 abokov-desktop /etc/init.d/mysql[3085]:

This problem can be solved by removing some mysql-related components :

sudo apt-get remove mysql-admin mysql-query-browser mysql-gui-tools-common mysql-client-5.0 libmysqlclient15off

and installing mysql server

sudo apt-get install mysql-server mysql-client

Leave a Reply