LoginSignup
1
1

More than 5 years have passed since last update.

MySQLのユーザー追加とDB追加

Posted at

MySQL のユーザー追加やDB追加の手順。

設定

DB設定

項目
DB名 hoge
文字コード utf-8

ユーザー設定

項目
ユーザー名 jack@localhost
パスワード foobar
アクセスできるDB名 hoge
権限 全て

DB追加

$ mysql 
mysql> CREATE DATABASE hoge CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)

ユーザー追加

$ mysql 
mysql>  GRANT ALL PRIVILEGES ON hoge.* TO jack@localhost IDENTIFIED BY 'foobar';
Query OK, 1 row affected (0.00 sec)
1
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
1
1