Ô¶³ÌÁ¬½Ómysql×ÊÁÏ
Ô¶³ÌÁ¬½Óµ½mysqlÐèÒª×öµÄ£º
1¡¢½øÈëmysql£¬´´½¨Ò»¸öÐÂÓû§xuys£º
¸ñʽ£ºgrant ȨÏÞ on Êý¾Ý¿âÃû.±íÃû Óû§@µÇ¼Ö÷»ú identified by "Óû§ÃÜÂë";
grant select,update,insert,delete on *.* to xuys@192.168.88.234 identified by "xuys1234";
²é¿´½á¹û£¬Ö´ÐУº
use mysql;
select host,user,password from user;
¿ÉÒÔ¿´µ½ÔÚuser±íÖÐÒÑÓиղŴ´½¨µÄxuysÓû§¡£host×ֶαíʾµÇ¼µÄÖ÷»ú£¬ÆäÖµ¿ÉÒÔÓÃIP£¬Ò²¿ÉÓÃÖ÷»úÃû£¬½«host×ֶεÄÖµ¸ÄΪ%¾Í±íʾÔÚÈκοͻ§¶Ë»úÆ÷ÉÏÄÜÒÔxuysÓû§µÇ¼µ½mysql·þÎñÆ÷£¬½¨ÒéÔÚ¿ª·¢Ê±ÉèΪ%¡£
update user set host = '%' where user = 'xuys';
2¡¢ ./mysqladmin -uroot -ppwd reload
./mysqladmin -uroot -ppwd shutdown
3¡¢./mysqld_safe --user=root &
¼Çס£º¶ÔÊÚȨ±íµÄÈκÎÐ޸Ķ¼ÐèÒªÖØÐÂreload£¬¼´Ö´ÐеÚ3²½¡£
Èç¹û¾¹ýÒÔÉÏ3¸ö²½Ö軹ÊÇÎÞ·¨´Ó¿Í»§¶ËÁ¬½Ó£¬ÇëÖ´ÐÐÒÔϲÙ×÷£¬ÔÚmysqlÊý¾Ý¿âµÄdb±íÖвåÈëÒ»Ìõ¼Ç¼£º
use mysql;
insert into db
values('192.168.88.234','%','xuys','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
update db set host = '%' where user = 'xuys';
Öظ´Ö´ÐÐÉÏÃæµÄµÚ2¡¢3²½¡£