mysql重启失败原因

执行service mysqld restart 重启失败,显示没有/tmp/mysql.sock
且真的没有,
然后查看下mysql状态,service mysqld status显示MySQL is running but PID file could not be found,说明mysql没有彻底停掉,于是ps kill下,再次service mysqld start下启动成功,原因可能是改过hostname

安装过程问题及解决办法:
mysql 

2010-10-19 00:04:05|  分类: linux |字号 订阅
1.error:curses/termcap no found

rpm -q ncurses

rpm -q termcap

rpm -q ncurses-devel 这三个包安装完毕就可以啦。

2.../depcomp: line 571: exec: g++: not found
make[1]: *** [my_new.o] 错误 127
make[1]: Leaving directory `/home/justme/software/mysql-5.1.30/mysys'
make: *** [all-recursive] 错误 1

yum install gcc-c++

3.../include/my_global.h:909: error: redeclaration of C++ built-in type `bool'
make[2]: *** [my_new.o] Error 1
make[2]: Leaving directory `/home/tools/mysql-5.0.22/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tools/mysql-5.0.22'
make: *** [all] Error 2
是因为gcc-c++是在configure之后安装的,此时只需重新configure后再编译make即可。

shell> groupadd mysql

shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root  .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &

猜你喜欢

转载自zhuruxin86.iteye.com/blog/1522234