好久没看博客,去google analytics看怎么流量锐减,从3月18号之后就没有流量了,发现是网站们都down了,数据库连不上。
后台数据库没有起来,试着起一下,报了错误:Manager of pid-file quit without updating file
查找数据库启动日志,我用的lnmp所以在/usr/local//var里,发现

150331 00:13:26 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
150331  0:13:26 [ERROR] Aborting
 
150331  0:13:26 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete
 
150331 00:13:26 mysqld_safe mysqld from pid file /usr/local/mysql/var/svr.pid ended

重要的一句:File ‘./mysql-bin.index’ not found (Errcode: 13)
查看mysql-bin.index 文件是存在的,所以应该是权限问题。
将var下的所有文件chown到mysql用户下,问题解决

chown -R mysql:mysql var/
浏览:734
© 2016 Zhonghcc 's Blog Suffusion theme by Sayontan Sinha