Created
July 26, 2017 16:13
-
-
Save iitenkida7/6179e178a9469c2b51aedfa40f6cdcd9 to your computer and use it in GitHub Desktop.
[MySQL]Create Scheme and User
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[DB作成]一般的な作成方法 | |
CREATE DATABASE @新ユーザー@_db CHARACTER SET utf8; | |
#[ユーザ作成]ローカル以外からのアクセスが有る場合 | |
grant all privileges on @新ユーザー@_db.* to @新ユーザー@@'%' identified by '@DBパスワード@'; | |
#[ユーザ作成]ローカルアクセスがある場合 | |
grant all privileges on @新ユーザー@_db.* to @新ユーザー@@'localhost' identified by '@DBパスワード@'; | |
#[ユーザ権限]他のテーブルに権限をつける必要がある場合など | |
grant all privileges on shared .* to @新ユーザー@@'%'; | |
#[反映] | |
flush privileges; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment