# Mysqlを起動させる
$ mysql.server start
# Mysqlを停止させる
$ mysql.server stop
# Mysqlを起動させて以下のエラーが出たら、一旦停止させる
> mysqld_safe A mysqld process already exists
# ログイン
$ mysql -uroot
# ユーザー一覧の取得
$ mysql> SELECT Host, User FROM mysql.user;
# ユーザー作成
$ mysql> create user '[user_name]@localhost' indentified by '[password]';
# ユーザーにall権限を与える
$ mysql> grant all on *.* to '[user_name]@localhost';
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme