mysql的启动方式


添加 mysqld 服务。


/sbin/chkconfig �C-add mysqld [在服务清单中添加mysql服务]


接着开始启动mysql。


service mysqld start;(即/etc/init.d/mysqld start。也可设成开机自启动:/sbin/chkconfig mysqld on)


然后,额。。。出现 “MySQL Daemon failed to start”的信息,怎么办?自己是这样解决的。


1. 初始化数据库


/usr/bin/mysql_install_db --user=mysql


cp /usr/share/mysql/my-small.cnf /etc/my.cnf(可选)


2. 以safe方式登录mysql


cd /usr ;


/usr/bin/mysqld_safe &


3. 再次启动mysqld服务时就可以了。


本文出自 “IT达人” 博客,转载请与作者联系!

你可能感兴趣的:(server,service,源代码,failed,through)