我的MySql版本是Server version: 5.6.16 Source distribution,
使用 “service mysql.server start ”启动mysql总是失败,
错误日志有如下信息:
2014-07-03 19:46:50 4095 [Note] InnoDB: 128 rollback segment(s) are active.
2014-07-03 19:46:50 4095 [Note] InnoDB: Waiting for purge to start
2014-07-03 19:46:50 4095 [Note] InnoDB: 5.6.16 started; log sequence number 1626173
2014-07-03 19:46:50 4095 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: b8821c78-02a7-11e4-9981-000c29711563.
/usr/local/mysql/bin/mysqld: File './auto.cnf' not found (Errcode: 13 - Permission denied)
2014-07-03 19:46:50 4095 [ERROR] Failed to create file(file: './auto.cnf', errno 13)
2014-07-03 19:46:50 4095 [ERROR] Initialzation of the server's UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID.
2014-07-03 19:46:50 4095 [ERROR] Aborting
2014-07-03 19:46:50 4095 [Note] Binlog end
2014-07-03 19:46:50 4095 [Note] Shutting down plugin 'partition'
2014-07-03 19:46:50 4095 [Note] Shutting down plugin 'ARCHIVE'
2014-07-03 19:46:50 4095 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
服务启动方式配置过程如下
1)cp /usr/local/mysql/support-files/mysql.server /etc/init.d/
2)chkconfig --add mysql.server
3)启动mysql服务器:service mysql.server {start|stop|restart|reload|force-reload|status}
注:如下2种启动方式正常:
./mysqld --defaults-file=/etc/my.cnf --user=root
./mysqld_safe --defaults-file=/etc/my.cnf --user=root &
有人遇到过这种情况么?求大神指教。
--转自