0

我使用的托管服务器没有为我提供 root 帐户。他们不为我提供数据库安装服务。服务器是 Red Hat Enterprise Linux Server release 6.1 (Santiago) x86_64。

我尝试下载并安装 MySQL 5.7.10,但它显示了有关 InnoDB 设置的错误,如下所示:

[hoge@blackett mysql]$ ./bin/mysqld --initialize --basedir=/home/hoge/mysql --character-set-server=utf8
2016-01-27T14:20:51.751550Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-01-27T14:20:51.751921Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-01-27T14:20:52.148092Z 0 [Warning] InnoDB: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
2016-01-27T14:20:52.148146Z 0 [Warning] InnoDB: io_setup() attempt 1.
2016-01-27T14:20:52.658080Z 0 [Warning] InnoDB: io_setup() attempt 2.
2016-01-27T14:20:53.168026Z 0 [Warning] InnoDB: io_setup() attempt 3.
2016-01-27T14:20:53.676057Z 0 [Warning] InnoDB: io_setup() attempt 4.
2016-01-27T14:20:54.181090Z 0 [Warning] InnoDB: io_setup() attempt 5.
2016-01-27T14:20:54.687086Z 0 [ERROR] InnoDB: io_setup() failed with EAGAIN after 5 attempts.
2016-01-27T14:20:54.687174Z 0 [ERROR] InnoDB: Cannot initialize AIO sub-system
2016-01-27T14:20:54.687194Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2016-01-27T14:20:54.687208Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-01-27T14:20:54.687215Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-01-27T14:20:54.687223Z 0 [ERROR] Failed to initialize plugins.
2016-01-27T14:20:54.687229Z 0 [ERROR] Aborting

我还做了以下事情:

cp ./support-files/my-default.cnf ~/my.cnf

我尝试了以下命令,但它给了我同样的错误:

[hoge@blackett mysql]$ ./bin/mysqld --initialize --character-set-server=utf8 --basedir=/home/hoge/mysql --defaults-file=/home/hoge/my.cnf

我在 my.cnf 中写了以下内容,但没有解决错误:

innodb_use_native_aio = 0

我没有解决它们的想法。请你帮助我好吗?

4

2 回答 2

1

也许...

在 Linux 系统上,使用默认设置 innodb_read_io_threads、innodb_write_io_threads 和 Linux aio-max-nr 设置运行多个 MySQL 服务器(通常超过 12 个)可能会超出系统限制。理想情况下,增加 aio-max-nr 设置;作为一种解决方法,您可以减少一个或两个 MySQL 配置选项的设置。

-- http://bugs.mysql.com/bug.php?id=61575

于 2016-01-28T00:18:43.107 回答
0

我自己解决了这个问题。

文档https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html

--defaults-file 选项必须是第一个

当我输入./bin/mysqld --defaults-file=/home/hoge/my.cnf --initialize --character-set-server=utf8 --basedir=/home/hoge/mysql时,选项文件被识别。

另一种解决方案是--innodb_use_native_aio=0不使用选项文件 my.cnf 直接指定选项,如下所示:

./bin/mysqld --initialize --basedir=/home/utpsy/mysql --character-set-server=utf8 --innodb_use_native_aio=0
于 2016-02-01T11:10:52.397 回答