LoginSignup
2
1

More than 5 years have passed since last update.

【AWS】t2.nanoのEC2インスタンスでのMySQL起動が失敗する。

Posted at

経緯

t2.microのEC2にMySQLをインストールした後、ステージング環境作成のため、AMIを作成したが、その後、作成したAMIからt2.nanoのEC2を起動したら、MySQLが起動しなかったので、その時に行った作業の備忘録です。

環境

mysql Ver 14.14 Distrib 5.6.36
Amazon Linux AMI release 2017.03

結果

下記のサイトが参考になりました。どうもありがとうございました。
t2.nano で MySQL5.6 を動かすために

やったこと

  • エラー内容の確認
  • MySQLのバージョン確認
  • My.confに設定追加

エラーログの確認

/var/log/mysqld.log
・
・
2017-09-07 08:52:41 2962 [Note] Plugin 'FEDERATED' is disabled.
2017-09-07 08:52:42 2962 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-09-07 08:52:42 2962 [Note] InnoDB: The InnoDB memory heap is disabled
2017-09-07 08:52:42 2962 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-07 08:52:42 2962 [Note] InnoDB: Memory barrier is not used
2017-09-07 08:52:42 2962 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-09-07 08:52:42 2962 [Note] InnoDB: Using Linux native AIO
2017-09-07 08:52:42 2962 [Note] InnoDB: Using CPU crc32 instructions
2017-09-07 08:52:42 2962 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2017-09-07 08:52:42 2962 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-09-07 08:52:42 2962 [ERROR] Plugin 'InnoDB' init function returned error.
2017-09-07 08:52:42 2962 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-09-07 08:52:42 2962 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-09-07 08:52:42 2962 [ERROR] Aborting
・
・

MySQLのバージョン確認

$ sudo mysql --version
mysql  Ver 14.14 Distrib 5.6.36, for Linux (x86_64) using  EditLine wrapper

my.cnfの修正

/etc/my.cnf
[mysqld]
・
・
・
performance_schema=off
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1