USE mysql;
SELECT host, user FROM user
현재 PC에서만 접속 가능한 사용자
CREATE USER 'username'@'localhost' identified by 'password';
외부에서 접속 가능한 사용자
CREATE USER 'username'@'%' identified by 'password';
DROP USER 'username'@'localhost'
DROP USER 'username'@'%'
testdb
생성CREATE DATABASES testdb;
SHOW databases;
USE mysql;
CREATE USER 'noma'@'localhost' identified by '1234';
SELECT host, user from user;
SHOW GRANTS FOR 'username'@'localhost';
GRANT ALL ON dbname.* to 'username'@'localhost';
REVOVE ALL ON dbname.* to 'username'@'localhost';