LoginSignup
0
1

More than 1 year has passed since last update.

MariaDB で、ユーザーが存在しない時にユーザーを作成

Last updated at Posted at 2017-06-08
create user if not exists scott@localhost identified by 'tiger123';

この sql が使えるのは
10.1.22-MariaDB (Ubuntu 17.04)
10.1.33-MariaDB (Arch Linux)
10.4.13-MariaDB (Arch Linux)
10.11.2-MariaDB (Arch Linux)

使えないのは
10.0.30-MariaDB (Raspbian)
10.0.29-MariaDB (Ubuntu 16.04)

ユーザーの表示

select user,host from mysql.user;

ユーザーの削除

drop user scott@localhost;
0
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
0
1