mysql 升级后的连锁反应

上次由于 mysql replication 的问题把一台原先跑 mysql 5.0 的服务器升级到了  mysql 5.1,升级后果然 replication 再没出现过问题。但是今天突然发现 postfix 无法启动,检查日志发现很多类似提示:

postfix/smtpd[1485]: fatal: no SASL authentication mechanisms

检查一下,发现 dovecot 没有起来,手工启动也失败,继续检查日志,发现

dovecot: auth(default): /libexec/ld-elf.so.1: Shared object "libmysqlclient.so.15" not found, required by "dovecot-auth"

到 /usr/local/mysql/lib 一看傻眼了,mysql 5.1 的 client 库也变了,是 libmysqlclient.so.16 了,而 dovecot 还在找 5.0 的 .15,所以显然无法启动。

尝试耍鸡贼 ln -s  libmysqlclient.so.15 libmysqlclient.so.16,启动 dovecot:

auth(default): /libexec/ld-elf.so.1: /usr/local/lib/mysql/libmysqlclient.so.15: version libmysqlclient_15 required by /usr/local/libexec/dovecot/dovecot-auth not found

骗不过去。。只好重新安装 dovecot 了。。。

cd /usr/ports/mail/dovecot
sudo make deinstall
sudo make reinstall
/usr/local/etc/rc.d/dovecot start

启动成功,postfix 恢复正常。服务器上这些东西真是牵一发而动全身呀,所以没事还是别折腾的好,弄不好就得被迫升级一大堆相关联的东西。

UPDATE:经 @delphij 大婶点拨,可以直接用

portmaster -Bdv dovecot

重装 dovecot

This entry was posted in 我的慵懒生活, 电脑相关 and tagged , , . Bookmark the permalink.

One Response to mysql 升级后的连锁反应

  1. Pingback: mysqlbinlog Error in Log_event 原因及其解决 | gkp's post

Leave a Reply

Your email address will not be published. Required fields are marked *


three + 3 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>