root 계정으로 mysql에 접속
mysql -u root -p
현재 database 목록 확인
show databases;
Database 이름을 지정하여 생성
create database dbname;
해당 데이터베이스로 이동(사용)
use dbname;
database 삭제
drop database dbname;
select host, user from user;
create user 'username'@'localhost' identified by 'password';
create user 'username'@'%' identified by 'password';
drop user 'username'@'localhost';
drop user 'username'@'%';
show grants for 'username'@'localhost';
grant all on dbname.* to 'username'@'localhost';
flush privileges;
revoke all on dbname.* from 'username'@'localhost';