computer science/DataBase

mysql root 외부 접속 권한 주기

푸른너구리 2012. 11. 4. 19:00

<root로 로그인>
# mysql -uroot -p

password: *****

 

mysql>use mysql

 

<로그인 할 사용자 생성>

mysql>insert into user(host,user,password) values('접속허용할 호스트네임 or IP','root',password('패스워드'));

 

<권한주기>

mysql> grant all privileges on *.* to 'root'@'%' identified by '암호' with grant option;
mysql> flush privileges


mysql> select * from user where User = 'root'


<원격지에서 접속 : -h 옵션>
# mysql -h host -u user -p

 

원본글주소:http://jonnychoe.egloos.com/5217253