环境:
root@ubuntu:~# uname -a
Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
使用的 apt-get install mysql-server安装的,然后改变了一下默认的字符集,在/etc/mysql/my.cnf里面的[mysqld]和[client]里加了
default-character-set=utf8,重启就不行了。
root@ubuntu:~# service mysql start
start: Job failed to start
看了系统日志,报了以下内容
Jun 11 22:56:42 ubuntu kernel: [ 4051.584941] init: mysql main process (4021) terminated with status 7
Jun 11 22:56:42 ubuntu kernel: [ 4051.584981] init: mysql main process ended, respawning
Jun 11 22:56:43 ubuntu kernel: [ 4052.134766] init: mysql post-start process (4022) terminated with status 1
Jun 11 22:56:43 ubuntu kernel: [ 4052.154739] type=1400 audit(1339469803.511:40): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=4068 comm="apparmor_parser"
Jun 11 22:56:44 ubuntu kernel: [ 4053.619246] init: mysql main process (4072) terminated with status 7
Jun 11 22:56:44 ubuntu kernel: [ 4053.619296] init: mysql main process ended, respawning
Jun 11 22:56:45 ubuntu kernel: [ 4054.248707] init: mysql post-start process (4073) terminated with status 1
Jun 11 22:56:45 ubuntu kernel: [ 4054.269778] type=1400 audit(1339469805.627:41): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=4119 comm="apparmor_parser"
Jun 11 22:56:47 ubuntu kernel: [ 4055.733347] init: mysql main process (4123) terminated with status 7
Jun 11 22:56:47 ubuntu kernel: [ 4055.733389] init: mysql respawning too fast, stopped
root@ubuntu:~#
大概是跟apparmor有关,我改了/etc/apparmor.d/usr.sbin.mysqd
/etc/mysql/conf.d/ rw,
/etc/mysql/conf.d/* rw,
/etc/mysql/*.cnf rwkm,
还是不行,启动不了。求大神帮忙。谢谢