Ubuntu 11.10 mysql problem after upgrade

原文网址:http://my.opera.com/djfake/blog/2011/11/05/ubuntu-11-10-mysql-problem-after-upgrade


Ubuntu 11.10 mysql problem after upgrade

If you find that mysql doesn't run after upgrading to 11.10, it could an issue with the fact that /var/run was replaced with /run.

Check  /var/log/mysql/error.log, and you'll find something like this: 
111104 19:11:33 [Note] Plugin 'FEDERATED' is disabled.
111104 19:11:33  InnoDB: Initializing buffer pool, size = 8.0M
111104 19:11:33  InnoDB: Completed initialization of buffer pool
111104 19:11:34  InnoDB: Started; log sequence number 0 44233
111104 19:11:34 [ERROR] Can't start server : Bind on unix socket: Permission den
ied
111104 19:11:34 [ERROR] Do you already have another mysqld server running on soc
ket: /var/run/mysqld/mysqld.sock ?
111104 19:11:34 [ERROR] Aborting

Or if you try to login to mysql, you'll get this:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Well, here's the fix! Go edit  /etc/apparmor.d/usr.sbin.mysqld as root and replace
  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,

with 
  /{,var/}run/mysqld/mysqld.pid w,
  /{,var/}run/mysqld/mysqld.sock w,

then 
sudo service mysql restart

and viola! our mysql db's are back!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值