另一种手动配置自已启动:
可能会出现这种情况,如果你试图在/etc/rc.d/rc3.d目录下运行../init.d/mysql start可能会收到如下错误
Starting MySQLCouldn't find MySQL server (./bin/mysqld_safe[失败]
可见mysql.server内部引用了一个相对路径./bin/mysqld_safe,所以这样就导致失败。
这样我们可以直接在rc.local文件中添加启动脚本:
# chkconfig --del mysql
# cd /etc/rc.d
# vi rc.local //添加: /usr/local/mysql/bin/mysqld_safe --user=mysql &
解决办法:在/etc/my.cnf 配置文件中添加:
basedir = /usr/local/mysql
8)、修改MySQL的root用户的密码:
# mysql -u root mysql
mysql>use mysql;
mysql>desc user;
mysql>update user set Password = password('xxxxxx') where User='root';
mysql>select Host,User,Password from user where User='root';
mysql>flush privileges;
mysql>exit
重新登录:mysql -u root -p
9)、添加软链接
# ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
# ln -s /usr/local/mysql/include/mysql /usr/include/mysql
注意事项:
<1>、MySQL5.5 默认使用InnoDB作为存储引擎,所以可以不设置DWITH_MYISAM_STORAGE_ENGINE值
