0

I am using a hosting server that doesn't provide me with a root account. They don't provide me with an installation service of database. The server is Red Hat Enterprise Linux Server release 6.1 (Santiago) x86_64.

I tried to download and install MySQL 5.7.10, but it shows me errors regarding to InnoDB setup as below:

[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

I also did the following:

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

I tried the following command, but it gives me the same errors:

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

I wrote the following in my.cnf, but doesn't solve the error:

innodb_use_native_aio = 0

I have no ideas to solve them. Could you please help me?

Iwao Nishida
  • 866
  • 6
  • 6
  • You have a hosting account without a database? Looks like you know enough to just go and get an AWS account and set it up yourself. – eggmatters Jan 27 '16 at 23:45
  • No, the customer doesn't want to use other services. – Iwao Nishida Jan 27 '16 at 23:48
  • Try using sqlite in your application if you need persistence. Or tell your customer how boned you are and they're not going to have an application if you can't access a database. – eggmatters Jan 27 '16 at 23:54

2 Answers2

1

Maybe...

On Linux systems, running multiple MySQL servers (typically more than 12) with default settings for innodb_read_io_threads, innodb_write_io_threads, and the Linux aio-max-nr setting can exceed system limits. Ideally, increase the aio-max-nr setting; as a workaround, you might reduce the settings for one or both of the MySQL configuration options.

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

Rick James
  • 135,179
  • 13
  • 127
  • 222
0

I resolved the issue myself.

The document https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html says

the --defaults-file option must be first

When I typed ./bin/mysqld --defaults-file=/home/hoge/my.cnf --initialize --character-set-server=utf8 --basedir=/home/hoge/mysql, the option file was recognized.

Another solution is to specify --innodb_use_native_aio=0 option directly without using the option file, my.cnf, as below:

./bin/mysqld --initialize --basedir=/home/utpsy/mysql --character-set-server=utf8 --innodb_use_native_aio=0
Iwao Nishida
  • 866
  • 6
  • 6