2
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 1 year has passed since last update.

【MySQL】データベースのセキュリティや障害対策についてのメモ

Posted at

mysql -u rootを打ってパスワードを入力せずにサーバに入れたらやばい。

平文パスワードをデータベースに保存しない。ハッシュ化する。ハッシュ化するときに平文をそのままハッシュ関数に入れると、レインボーテーブルを使ってデータが漏れてしまう可能性があるから、hash(hash(パスワード)+ソルト) 値という風にする。

辞書にかいてあるような単語をパスワードにしない。

ファイアウォールを必ず設定する。

ユーザから送られるデータを信頼しない。例えばSQLインジェクションとかがある。

shell> mysql -u francis -pfrank db_name

じゃなくて、

shell> mysql -u francis -p db_name
Enter password: ********
2
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
2
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?