Help us understand the problem. What is going on with this article?

MySQLのユーザー一覧を取得する

More than 5 years have passed since last update.

MySQLのユーザー一覧を取得するSQL文

SELECT * FROM mysql.user

ホスト名(Host)、ユーザー名(User)、パスワード(Password)の他に、
権限に関するカラムがありY/Nの値が格納されている。

全権ユーザーを作成するSQL文は下記

GRANT ALL PRIVILEGES ON *.* TO 'newuser@localhost' IDENTIFIED BY 'xxxxxxxx' WITH GRANT OPTION;
day-1
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away