MySQL 5.6 社区服务器在 CentOS 6 中启动失败

MySQL 5.6 社区服务器在 CentOS 6 中启动失败

MySQL 5.6 社区服务器无法在 CentOS 6 上启动。

之前,我已经在我的 CentOS 6 上成功安装了 mysql 社区服务器(文件:mysql-community-release-el6-5.noarch.rpm),二进制源代码来自http://dev.mysql.com/downloads/repo/yum

我对配置 /etc/my1.conf 和启动脚本 /etc/init.d/mysqld1 做了一些更改,更改了数据、日志和 pid 文件的位置,请查看以下更改:

file: /etc/my1.conf
[mysqld]
innodb_buffer_pool_size = 128M
datadir=/opt/mysql/mysql1
socket=/opt/mysql/mysql1/mysql.sock
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/opt/mysql/log/mysqld1.log
pid-file=/opt/mysql/run/mysqld1.pid

file: /etc/init.d/mysqld1
datadir="/opt/mysql/mysql1"
socketfile="/opt/mysql/mysql1/mysql.sock"
errlogfile="/opt/mysql/log/mysqld1.log"
mypidfile="/opt/mysql/run/mysqld1.pid"
defaultfile="/etc/my1.cnf"
$exec --defaults-file="$defaultfile" \
  --datadir="$datadir" --socket="$socketfile" \
  --pid-file="$mypidfile" \
  --basedir=/usr --user=mysql >/dev/null 2>&1 &

我启动后它总是失败

$ sudo service mysqld1 start
[sudo] password for beepcast:
141230 10:38:57 mysqld_safe Logging to '/opt/mysql/log/mysqld1.log'.
141230 10:38:57 mysqld_safe Starting mysqld daemon with databases from /opt/mysql/mysql1
... (hang)

当我检查日志文件时,它没有显示任何错误,请查看下面的日志文件:

2014-12-30 10:38:57 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-12-30 10:38:57 2674 [Note] Plugin 'FEDERATED' is disabled.
2014-12-30 10:38:57 2674 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-12-30 10:38:57 2674 [Note] InnoDB: The InnoDB memory heap is disabled
2014-12-30 10:38:57 2674 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-12-30 10:38:57 2674 [Note] InnoDB: Memory barrier is not used
2014-12-30 10:38:57 2674 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-12-30 10:38:57 2674 [Note] InnoDB: Using Linux native AIO
2014-12-30 10:38:57 2674 [Note] InnoDB: Not using CPU crc32 instructions
2014-12-30 10:38:57 2674 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-12-30 10:38:57 2674 [Note] InnoDB: Completed initialization of buffer pool
2014-12-30 10:38:57 2674 [Note] InnoDB: Highest supported file format is Barracuda.
2014-12-30 10:38:59 2674 [Note] InnoDB: 128 rollback segment(s) are active.
2014-12-30 10:38:59 2674 [Note] InnoDB: Waiting for purge to start
2014-12-30 10:38:59 2674 [Note] InnoDB: 5.6.22 started; log sequence number 1626007
2014-12-30 10:38:59 2674 [Note] Server hostname (bind-address): '*'; port: 3306
2014-12-30 10:38:59 2674 [Note] IPv6 is available.
2014-12-30 10:38:59 2674 [Note]   - '::' resolves to '::';
2014-12-30 10:38:59 2674 [Note] Server socket created on IP: '::'.
2014-12-30 10:38:59 2674 [Note] Event Scheduler: Loaded 0 events
2014-12-30 10:38:59 2674 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.22'  socket: '/opt/mysql/mysql1/mysql.sock'  port: 3306  MySQL Community Server (GPL)

我不知道为什么会这样挂起?但可以肯定的是,mysql 服务器正在正常运行,并且侦听器端口已打开。

相关内容