前提・実現したいこと
EC2インスタンスにMysqlをインストール・起動しようとしたところ、起動の段階でエラーにより失敗しました。
プロセスのエラーまではたどり着きましたが、どこを修正して行けば良いか検討がつけられず・・・
ご教示いただけますと幸いです。
環境
OS:Amazon Linux release 2
Mysql:Mysql8.0
/etc/my.cnfの記載
[mysqld] log_timestamps=SYSTEM skip-character-set-client-handshake character-set-server=utf8mb4 explicit_defaults_for_timestamp=ON log-error=/var/log/mysqld.log
実行したコマンド(全てrootで実行)
$ yum list installed | grep mariadb #mariadbの削除を確認 $ sudo yum localinstall -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm $ sudo yum-config-manager --enable mysql80-community $ sudo yum install -y mysql $ sudo yum -y update $ sudo yum -y install mysql-community-server $ sudo service mysqld start
発生している問題・エラーメッセージ
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
systemctl status mysqld.service
● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2021-07-20 06:30:18 UTC; 21s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 21874 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE) Process: 21851 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Main PID: 21874 (code=exited, status=1/FAILURE) Status: "Server startup in progress" Jul 20 06:30:18 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: ... Jul 20 06:30:18 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: ... Jul 20 06:30:18 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: ... Jul 20 06:30:18 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: ... Jul 20 06:30:18 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: ... Hint: Some lines were ellipsized, use -l to show in full.
journalctl -xe
Jul 20 07:38:33 ip-172-32-52-159.ap-northeast-1.compute.internal sudo[22233]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/sbin/service mysqld star Jul 20 07:38:33 ip-172-32-52-159.ap-northeast-1.compute.internal sudo[22233]: pam_unix(sudo:session): session opened for user root by ec2-user(uid=0) Jul 20 07:38:33 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: Starting MySQL Server... -- Subject: Unit mysqld.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysqld.service has begun starting up. Jul 20 07:38:34 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE Jul 20 07:38:34 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: Failed to start MySQL Server. -- Subject: Unit mysqld.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysqld.service has failed. -- -- The result is failed. Jul 20 07:38:34 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: Unit mysqld.service entered failed state. Jul 20 07:38:34 ip-172-32-52-159.ap-northeast-1.compute.internal systemd[1]: mysqld.service failed. Jul 20 07:38:34 ip-172-32-52-159.ap-northeast-1.compute.internal sudo[22233]: pam_unix(sudo:session): session closed for user root
/var/log/mysqld.log
2021-07-19T16:17:16.374543Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.26) initializing of server in progress as process 12155 2021-07-19T16:17:16.428930Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-07-19T16:17:16.904320Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2021-07-19T16:17:17.977254Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main 2021-07-19T16:17:17.977632Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main 2021-07-19T16:17:18.168868Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: AEb;9.Ba=oxI 2021-07-19T16:17:21.501872Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26) starting as process 12201 2021-07-19T16:17:21.517859Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-07-19T16:17:21.523224Z 0 [ERROR] [MY-012681] [InnoDB] mmap(137101312 bytes) failed; errno 12 2021-07-19T16:17:21.523341Z 1 [ERROR] [MY-012956] [InnoDB] Cannot allocate memory for the buffer pool 2021-07-19T16:17:21.523418Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2021-07-19T16:17:21.523495Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2021-07-19T16:17:21.523658Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2021-07-19T16:17:21.523805Z 0 [ERROR] [MY-010119] [Server] Aborting 2021-07-19T16:17:21.525279Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.26) MySQL Community Server - GPL. 2021-07-19T16:25:12.986789Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.26) initializing of server in progress as process 12484 2021-07-19T16:25:13.043362Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-07-19T16:25:13.522811Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2021-07-19T16:25:14.718035Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main 2021-07-19T16:25:14.718442Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main 2021-07-19T16:25:14.847610Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ?k3aB;;aD?mc 2021-07-19T16:25:18.123201Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26) starting as process 12535 2021-07-19T16:25:18.142247Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-07-19T16:25:18.146734Z 0 [ERROR] [MY-012681] [InnoDB] mmap(137101312 bytes) failed; errno 12 2021-07-19T16:25:18.146844Z 1 [ERROR] [MY-012956] [InnoDB] Cannot allocate memory for the buffer pool 2021-07-19T16:25:18.146910Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2021-07-19T16:25:18.147003Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2021-07-19T16:25:18.147168Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2021-07-19T16:25:18.147316Z 0 [ERROR] [MY-010119] [Server] Aborting 2021-07-19T16:25:18.148748Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.26) MySQL Community Server - GPL. 2021-07-19T16:25:33.259848Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26) starting as process 12569 2021-07-19T16:25:33.267424Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-07-19T16:25:33.272721Z 0 [ERROR] [MY-012681] [InnoDB] mmap(137101312 bytes) failed; errno 12 2021-07-19T16:25:33.272839Z 1 [ERROR] [MY-012956] [InnoDB] Cannot allocate memory for the buffer pool 2021-07-19T16:25:33.272904Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2021-07-19T16:25:33.272980Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2021-07-19T16:25:33.273141Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2021-07-19T16:25:33.273272Z 0 [ERROR] [MY-010119] [Server] Aborting 2021-07-19T16:25:33.274406Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.26) MySQL Community Server - GPL. 2021-07-20T02:08:00.147536Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26) starting as process 15783 2021-07-20T02:08:00.206262Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-07-20T02:08:00.232128Z 0 [ERROR] [MY-012681] [InnoDB] mmap(137101312 bytes) failed; errno 12 2021-07-20T02:08:00.232248Z 1 [ERROR] [MY-012956] [InnoDB] Cannot allocate memory for the buffer pool 2021-07-20T02:08:00.232318Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2021-07-20T02:08:00.232396Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2021-07-20T02:08:00.232564Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
試したこと
- mariadbの削除
- removeして再インストール
- ~直下にmy.cnfが複数あったので/etc/my.cnfに移動・統合
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー