Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔõÑù½øÐÐMysqlÔ¶³ÌÁ¬½Ó


 ÔõÑù½øÐÐMysqlÔ¶³ÌÁ¬½Ó
ÎÒÓÃ:
grant all privileges on *.* to ´´½¨µÄÓû§Ãû@localhost identified by "ÃÜÂë";
flush privileges; \* ˢиղŵÄÄÚÈÝ*\
========================
mysqlĬÈÏÊDz»ÔÊÐíÔ¶³ÌÁ¬½ÓµÄ£¬ÒòΪÓкܴóµÄ°²È«Òþ»¼¡£¡£
ËùÒÔÐèÒªÊÖ¶¯Ôö¼Ó¿ÉÒÔÔ¶³Ì·ÃÎÊÊý¾Ý¿âµÄÓû§¡£
ÏÂÃæÊÇÁ¬½Ó·½Ê½£º
# mysql -u root -p
>;grant select,insert,update,delete on *.* to root@"202.11.10.253" Identified by "dboomysql";
----ÔÊÐíµØÖ·202.11.10.253ÉÏÓÃrootÓû§£¬ÃÜÂëdboomysqlÀ´Á¬½ÓmysqlµÄËùÓÐÊý¾Ý¿â£¬¸¶¸øselect,insert,update,deleteȨÏÞ¡£
grant all on *.* to root@"202.11.10.253" Identified by "dboomysql"
ÔÊÐíµØÖ·202.11.10.253ÉÏÓÃrootÓû§£¬ÃÜÂëdboomysqlÀ´Á¬½ÓmysqlµÄËùÓÐÊý¾Ý¿â£¬¸¶¸øËùÓÐȨÏÞ¡£
ÕâÑùÓÃÊý¾Ý¿â¹ÜÀíÈí¼þ¾Í¿ÉÒÔÔ¶³Ì·ÃÎÊMysqlÁË¡£
======================================
A1:
    Ô¶³ÌÁ¬½Óµ½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 -u root -p pwd reload
    ./mysqladmin -u root -p pwd shutdown
    3.
    ./mysqld_safe --user=root &
   
    ¼Çס: ¶ÔÊÚȨ±íµÄÈκÎÐ޸Ķ¼ÐèÒªÖØÐÂreload,¼´Ö´ÐеÚ3²½.
    Èç¹û¾­¹ýÒÔÉÏ3¸ö²½Ö軹ÊÇÎÞ·¨´Ó¿Í»§¶ËÁ¬½Ó,ÇëÖ´ÐÐÒÔϲÙ×÷,ÔÚMySQLÊý¾Ý¿âµÄdb±íÖвåÈëÒ»Ìõ¼Ç¼:
    use mysql;
    ins


Ïà¹ØÎĵµ£º

ÅäÖÃMySQLÖ÷´Ó¸´ÖÆ(Replication)


MySQLÖ§³Öµ¥Ïò¡¢Òì²½¸´ÖÆ£¬¸´Öƹý³ÌÖÐÒ»¸ö·þÎñÆ÷³äµ±Ö÷·þÎñÆ÷£¬¶øÒ»¸ö»ò¶à¸öÆäËü·þÎñÆ÷³äµ±´Ó·þÎñÆ÷¡£Ö÷·þÎñÆ÷½«¸üÐÂдÈë¶þ½øÖÆÈÕÖ¾Îļþ£¬²¢Î¬»¤ÈÕÖ¾ÎļþµÄÒ»¸öË÷ÒýÒÔ¸ú×ÙÈÕ־ѭ»·¡£µ±Ò»¸ö´Ó·þÎñÆ÷Á¬½Óµ½Ö÷·þÎñÆ÷ʱ£¬Ëü֪ͨÖ÷·þÎñÆ÷´Ó·þÎñÆ÷ÔÚÈÕÖ¾ÖжÁÈ¡µÄ×îºóÒ»´Î³É¹¦¸üеÄλÖᣴӷþÎñÆ÷½ÓÊÕ´ÓÄÇʱÆð·¢ÉúµÄÈκθüУ¬È ......

MySQLÖÐÎÄÂÒÂë½â¾ö·½°¸

˵Ã÷: ÔÚMYSQLÖУ¬Èç¹ûʹÓÃȱʡµÄ×Ö·û¼¯£¬ÔÚ½¨¿â¡¢½¨±íʱ£¬Ä¬ÈÏʹÓõÄÊÇlatin1×Ö·û¼¯£¬
ΪISO 8859-1Î÷Å·×Ö·û¼¯¡£²åÈëÖÐÎÄ×Ö·ûʱ£¬ÓëÖ®²»Æ¥Å䣬¾Í»á³öÏÖÂÒÂë¡£
¡¾½â¾ö·½°¸¡¿
1. ´ò¿ªÎļþ: C:\Program Files\MySQL\MySQL Server 5.0\my.ini;
2. ½«ÆäÖеÄdefault-character-set=latin1¸ÄΪdefault-character-set=gb2312, ......

PHPÓëMYSQLµÄ´æ´¢¹ý³Ì

ʵÀýÒ»£ºÎ޲εĴ洢¹ý³Ì
$conn = mysql_connect('localhost','root','root') or die ("Êý¾ÝÁ¬½Ó´íÎó!!!");
mysql_select_db('test',$conn);
$sql = "
create procedure myproce()
begin
INSERT INTO user (id, username, sex) VALUES (NULL, 's', '0');
end;
";
mysql_query($sql);//´´½¨Ò»¸ömyproceµÄ´æ´¢¹ý³Ì
......

ʵÀý½²½âÈçºÎʹÓÃC++²Ù×÷MySQLÊý¾Ý¿âÀà

 
¡¡¡¡ÓÃC++²Ù×÷MySQLÊý¾Ý¿âÀࣺ
¡¡¡¡×¢ÊÍ£ºÕ⼸¸öÀà¶Ô´¦Àí²»ÊǺܴóÊý¾ÝÁ¿µÄ²Ù×÷ÊǺÜÀíÏëµÄ£¬ µ«²»ÊÊÒËÌØ´óÐ͵ÄÊý¾ÝµÄ²éѯ£¬ÒòΪԴÂëÖн«²éѯµ½µÄÊý¾ÝÖ±½Ó·ÅÈëÁËÄÚ´æ¡£
¡¡¡¡/*
¡¡¡¡* project:
¡¡¡¡* ͨÓÃÄ£¿é ( Óà c++ ´¦Àí mysql Êý¾Ý¿âÀ࣬ÏñADO )
¡¡¡¡*
¡¡¡¡* description:
¡¡¡¡*
¡¡¡¡* ͨ¹ýDataBase,Reco ......

mysql Êý¾Ý¿âÒýÇæ

Èç¹ûÄãÊǸöÈü³µÊÖ£¬²¢ÇÒ°´Ò»Ï°´Å¥¾ÍÄܹ»Á¢¼´¸ü»»ÒýÇæ¶ø²»ÐèÒª°Ñ³µ¿ªµ½³µ¿âÀïÈ¥»»£¬ÄÇ»áÊÇʲô¸Ð¾õÄØ£¿MySQLÊý¾Ý¿âΪ¿ª·¢ÈËÔ±Ëù×öµÄ¾ÍºÃÏñÊÇ°´°´Å¥»»ÒýÇ棻ËüÈÃÄãÑ¡ÔñÊý¾Ý¿âÒýÇ棬²¢¸øÄãÒ»Ìõ¼òµ¥µÄ;¾¶À´Çл»Ëü¡£ 
MySQLµÄ×Ô´øÒýÇæ¿Ï¶¨Êǹ»ÓÃÁË£¬µ«ÊÇÔÚÓÐЩÇé¿öÏ£¬ÆäËûµÄÒýÇæ¿ÉÄÜÒª±ÈÊÖÍ·ËùÓøüÊʺÏÍê³ÉÈÎÎñ¡£Èç¹ûÔ¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ