簡體   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