티스토리 뷰
반응형
1. 사용자 생성
GRANT USAGE ON *.* TO 사용자ID@접속호스트 IDENTIFIED BY "패스워드"
or
GRANT USAGE ON *.* TO zboard@localhost IDENTIFIED BY "password"
or
2. 권한 부여
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON
디비이름 TO 사용자ID@접속호스트
디비이름 TO 사용자ID@접속호스트
or
or
3. 권한 로드
FLUSH PRIVILEGES
===============================================================================
C:\>cd APM_Setup\Server\MySQL\bin
C:\APM_Setup\Server\MySQL\bin>mysql.exe -uroot -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.0.15-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE IF NOT EXISTS zboard;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT USAGE ON *.* TO zboard@localhost IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON zboard.*
TO zboard@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
C:\APM_Setup\Server\MySQL\bin>mysql.exe -uzboard -p zboard
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 4.0.15-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
C:\APM_Setup\Server\MySQL\bin>
C:\APM_Setup\Server\MySQL\bin>mysql.exe -uroot -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.0.15-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE IF NOT EXISTS zboard;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT USAGE ON *.* TO zboard@localhost IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON zboard.*
TO zboard@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
C:\APM_Setup\Server\MySQL\bin>mysql.exe -uzboard -p zboard
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 4.0.15-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
C:\APM_Setup\Server\MySQL\bin>
반응형
'Naver Blog Backup' 카테고리의 다른 글
MySQL에 대용량 데이터 import하기 (0) | 2015.05.27 |
---|---|
초보도 알아야 할 MySQL 튜닝 18 가지 (0) | 2015.05.27 |
귀차니즘... 자주 쓰는 MySQL 명령어 정리 (0) | 2015.05.27 |
[MySQL] ERROR 2013: Lost connection to MySQL server (0) | 2015.05.27 |
Using MySQL Full-text Searching (0) | 2015.05.27 |
반응형
최근에 달린 댓글