2016-01-27 6 views
0

J'utilise un serveur d'hébergement qui ne me fournit pas de compte root. Ils ne me fournissent pas un service d'installation de base de données. Le serveur est la version 6.1 (Santiago) x86_64 de Red Hat Enterprise Linux Server.Impossible d'installer MySQL 5.7 sur un serveur sans compte root

J'ai essayé de télécharger et installer MySQL 5.7.10, mais il me montre des erreurs concernant la configuration de InnoDB comme ci-dessous:

[[email protected] 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 

J'ai aussi ce qui suit:

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

J'ai essayé le commande suivante, mais il me donne les mêmes erreurs:

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

J'ai écrit ce qui suit dans my.cnf, mais doesn ne résoudra pas l'erreur:

innodb_use_native_aio = 0 

Je n'ai aucune idée pour les résoudre. Pourriez-vous s'il vous plaît me contacter?

+0

Vous avez un compte d'hébergement sans une base de données? On dirait que vous en savez assez pour aller chercher un compte AWS et le configurer vous-même. – eggmatters

+0

Non, le client ne souhaite pas utiliser d'autres services. –

+0

Essayez d'utiliser sqlite dans votre application si vous avez besoin de persistance. Ou dites à votre client comment vous êtes désossé et ils ne vont pas avoir une application si vous ne pouvez pas accéder à une base de données. – eggmatters

Répondre

1

Peut-être ...

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

0

Je résolu la question moi-même.

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

the --defaults-file option must be first

Quand je tapais ./bin/mysqld --defaults-file=/home/hoge/my.cnf --initialize --character-set-server=utf8 --basedir=/home/hoge/mysql, le fichier d'options a été reconnu.

Une autre solution consiste à spécifier --innodb_use_native_aio=0 directement sans avoir le fichier d'options, my.cnf, comme ci-dessous:

./bin/mysqld --initialize --basedir=/home/utpsy/mysql --character-set-server=utf8 --innodb_use_native_aio=0