root@server]# mysql -uroot -p mysql
mysql> use mysql
mysql> insert into user (host,user,password) values ('%','root',password('password'));
mysql> show columns from db;
mysql> insert into db values ('%','databasename','root','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y');
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;
/etc/init.d/mysqld restart
-다른 host 에서 연결 테스트 해본다
mysql -h192.168.0.200 -uroot -p
댓글 없음:
댓글 쓰기