9. MySQL DATABASE
Creating and Using a Database
데이타 베이스 생성 및 사용
1) 데이타베이스 목록 보기
mysql> show databases ;
2) 데이타베이스 생성
mysql> create database testdb;
3) 데이타베이스 access
mysql> use testdb
semicolon(;) 이 없어도 된다.
4) 현재 내가 로그인 해서 사용중인/접속중인 데이타베이스 확인
mysql > select database();
5) db중에서 mysql, test db description
The mysql database describes user access privileges. The test database often is available as a workspace for users to try things out.
6) 사용자 생성
mysql> create user 'aaaa'@'localhost' identified by 'password';
7) 권한 부여
mysql> grant all privileges on testdb.* to 'aaaa@localhost' with grant option ;
8) 데이타 베이스 삭제
mysql> drop databse testdb;
* ERROR 1410 (42000): You are not allowed to create a user with GRANT
root로 접속해서 권한을 부여하는데도 위와 같은 오류가 발생하였다.
CREATE USER 'root'@'%' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
를 실행한 후에 다시 사용자에게 권한을 부여하니 된다.
https://dzzienki.tistory.com/22
MYSQL 유저 권한 주기 에러 ERROR 1410 (42000): You are not allowed to create a user with GRANT
MYSQL 에서 DB를 생성하고 유저에게 권한을 주려고 할 때 root 로 접속했음에도 ERROR 1410 (42000): You are not allowed to create a user with GRANT 라는 에러를 내뿜으며 유저에게 권한주기 권한이 없다는 에..
dzzienki.tistory.com