1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

EC2でのMySQL 各エラー対応

Last updated at Posted at 2020-06-18

##◯[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

my.cnf
[mysqld]
explicit_defaults_for_timestamp = 1

参考サイト:https://qiita.com/nnmr/items/79400922df5810756bce

◯mysqld --initialize(MySQLの初期化エラー)

sudo mysqld --initialize --user=mysql
[ERROR] --initialize specified but the data directory has files in it. Aborting.
[ERROR] Aborting
  • 解決策
my.cnf
datadir  = /data/mysql
tmpdir   = /data/mysql/tmp
innodb_data_home_dir            = ibdata
innodb_log_group_home_dir       = iblog
rm -fr /data/mysql/*
install -d -o mysql -g mysql -m 750 /data/mysql/{tmp,ibdata,iblog}
mysqld --initialize  --user=mysql --ignore-db-dir=tmp --ignore-db-dir=ibdata --ignore-db-dir=iblog
echo $?
0

参考サイト
https://hirose31.hatenablog.jp/entry/20161004/1475582156

エラー対応後、追記していく。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?