无法在没有root帐户的服务器上安装MySQL 5.7

时间:2016-01-27 23:38:20

标签: mysql innodb aio

我使用的托管服务器没有为我提供root帐户。 他们没有为我提供数据库的安装服务。 服务器是Red Hat Enterprise Linux Server 6.1版(圣地亚哥)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

我没有想法解决它们。 你能帮我吗?

2 个答案:

答案 0 :(得分:1)

也许 ...

  

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

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

答案 1 :(得分: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