2024/02/13 22:13:39

MySQL

ユーザセットアップ

ユーザ一覧

mysql> select host,user from mysql.user;

ユーザの追加

mysql> create user 'foo'@'localhost' identified by 'bar';

パスワードの変更

mysql> set password for user@"%"=PASSWORD('password');

ユーザの権限確認

mysql> show grants for foo;

権限変更

mysql> grant create on *.* to foo@localhost;

ユーザの削除

mysql> delete from mysql.user where user='foo';

権限の削除

mysql> revoke all privileges on *.* from foo;
サイト内検索