Skip to content

Instantly share code, notes, and snippets.

@nishinoshake
Last active July 10, 2016 13:41
Show Gist options
  • Save nishinoshake/579e6ed1550138cdafddb52be83146da to your computer and use it in GitHub Desktop.
Save nishinoshake/579e6ed1550138cdafddb52be83146da to your computer and use it in GitHub Desktop.
MySQL5.7インストール時にやること

##パスワードなどのセキュリティまわり ###パスワードを確認する grep 'generated' /var/log/mysqld.log A temporary password is generated for root@localhost: passwordddd

もっといい方法あるかもだけどログに書いてある

###パスワード変更など mysql_secure_installation

と入力するとなすがままにパスワード変更などが行われる。 ポリシー厳しい。

##DB作成とユーザ割り当て ###DBを作成する CREATE DATABASE dbname CHARACTER SET utf8;

###ユーザを作成して権限を与える GRANT ALL ON dbname.* TO username@'127.0.0.1' IDENTIFIED BY 'password';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment