Databases/Mysql 2009. 7. 28. 10:18
Mysql 접속
mysql -u root -p
mysql> use mysql -> 사용자 계정은 mysql database에 user 라는 테이블로 저장
mysql> select * from user; -> user 테이블에 있는 user 보기
mysql> create database webhard2; -> 하면 webhard2 라는 database가 만들어진다.
mysql> grant all privileges on webhard2.* to web@localhost identified by '1q2w3e' with grant option; -> webhard2 계정 생성 및 권환 부여
mysql> flush privileges; -> 지금까지 한 작업 저장
mysql -u root -p
mysql> use mysql -> 사용자 계정은 mysql database에 user 라는 테이블로 저장
mysql> select * from user; -> user 테이블에 있는 user 보기
mysql> create database webhard2; -> 하면 webhard2 라는 database가 만들어진다.
mysql> grant all privileges on webhard2.* to web@localhost identified by '1q2w3e' with grant option; -> webhard2 계정 생성 및 권환 부여
mysql> flush privileges; -> 지금까지 한 작업 저장