繁体   English   中英

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

[英]Can't install MySQL 5.7 on server without root account

我使用的主机服务器没有为我提供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

我没有办法解决。 请你帮助我好吗?

也许 ...

在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

我自己解决了这个问题。

该文件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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM