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

MysqlÖд´½¨Óû§ÕÊ»§µÄ·½·¨

1.CREATE USER
CREATE USER user [IDENTIFIED BY [PASSWORD] 'password']
    [, user [IDENTIFIED BY [PASSWORD] 'password']] ...
CREATE USERÓÃÓÚ´´½¨ÐµÄMySQLÕË»§¡£ÒªÊ¹ÓÃCREATE USER£¬Äú±ØÐëÓµÓÐmysqlÊý¾Ý¿âµÄÈ«¾ÖCREATE USERȨÏÞ£¬»òÓµÓÐINSERTȨÏÞ¡£¶ÔÓÚÿ¸öÕË»§£¬CREATE USER»áÔÚûÓÐȨÏÞµÄmysql.user±íÖд´½¨Ò»¸öмǼ¡£Èç¹û ÕË»§ÒѾ­´æÔÚ£¬Ôò³öÏÖ´íÎó¡£
ʹÓÃ×ÔÑ¡µÄIDENTIFIED BY×Ӿ䣬¿ÉÒÔΪÕË»§¸ø¶¨Ò»¸öÃÜÂë¡£userÖµºÍ ÃÜÂëµÄ¸ø¶¨·½·¨ºÍGRANTÓï¾äÒ»Ñù¡£ÌرðÊÇ£¬ÒªÔÚ´¿Îı¾ÖÐÖ¸¶¨ÃÜÂ룬ÐèºöÂÔPASSWORD¹Ø¼ü´Ê¡£Òª°Ñ ÃÜÂëÖ¸¶¨ÎªÓÉPASSWORD()º¯Êý·µ»ØµÄ»ì±àÖµ£¬Ðè°üº¬¹Ø¼ü×ÖPASSWORD¡£
2.ʹÓÃGRANTÓï¾ä
×îºÃµÄ·½·¨ÊÇʹÓÃGRANTÓï¾ä£¬ÒòΪÕâÑù¸ü¾«È·£¬´íÎóÉÙ¡£´ÓMySQL 3.22.11ÆðÌṩÁËGRANT£»ËüµÄÖ÷ÒªÓÃ;ÊÇÀ´¸øÕÊ»§ÊÚȨµÄ£¬µ«Ò²¿ÉÓÃÀ´½¨Á¢ÐÂÕÊ»§²¢Í¬Ê±ÊÚȨ¡£×¢Ò⣺µ±mysqlÔËÐÐÓÚno_auto_create_userʱҪÌṩн¨Óû§µÄÃÜÂ룬·ñÔò²»ÄÜ´´ÐÂÓû§¡£
ÏÂÃæµÄʾÀý˵Ã÷ÈçºÎʹÓÃMySQL¿Í»§¶Ë³ÌÐòÀ´ÉèÖÃÐÂÓû§¡£
Ê×ÏÈ£¬Ê¹ÓÃMySQL³ÌÐòÒÔMySQL rootÓû§À´Á¬½Ó·þÎñÆ÷£º
shell> MySQL --user=root MySQL
Èç¹ûÄãΪrootÕË»§Ö¸¶¨ÁËÃÜÂ룬»¹ÐèҪΪ¸ÃMySQLÃüÁîºÍ±¾½ÚÖеÄÆäËüÃüÁîÌṩ--password»ò-pÑ¡Ïî¡£
ÒÔrootÁ¬½Óµ½·þÎñÆ÷ÉϺ󣬿ÉÒÔÌí¼ÓÐÂÕË»§¡£ÏÂÃæµÄÓï¾äʹÓÃGRANTÀ´ÉèÖÃËĸöÐÂÕË»§£º
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';
ÓÃGRANTÓï¾ä´´½¨µÄÕË»§ÓÐÏÂÃæµÄÊôÐÔ£º
·         ÆäÖÐÁ½¸öÕË»§ÓÐÏàͬµÄÓû§ÃûmontyºÍÃÜÂësome_pass¡£Á½¸öÕË»§¾ùΪ³¬¼¶Óû§ÕË»§£¬¾ßÓÐÍêÈ«µÄȨÏÞ¿ÉÒÔ×öÈκÎÊÂÇé¡£Ò»¸öÕË»§ ('monty'@'localhost')Ö»ÓÃÓÚ´Ó±¾»úÁ¬½Óʱ¡£ÁíÒ»¸öÕË»§('monty'@'%')¿ÉÓÃÓÚ´ÓÆäËüÖ÷»úÁ¬½Ó¡£Çë×¢ÒâmontyµÄÁ½¸öÕË»§±ØÐëÄÜ´ÓÈκÎÖ÷»úÒÔmontyÁ¬½Ó¡£Ã»ÓÐlocalhostÕË»§£¬µ±monty´Ó±¾»úÁ¬½Óʱ£¬mysql_install_db´´½¨µÄlocalhostµÄÄäÃûÓû§ÕË»§½«Õ¼ÏÈ¡£½á¹ûÊÇ£¬monty½«±»


Ïà¹ØÎĵµ£º

MySqlÃüÁî´óÈ«

³£¼ûµÄMySQLÃüÁî´óÈ«
Ò»¡¢Á¬½ÓMySQL
        ¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
        1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
        Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql ......

MySQL´æ´¢ÒýÇæ±È½Ï

MySQL³£ÓõĴ洢ÒýÇæΪMyISAM¡¢InnoDB¡¢MEMORY¡¢MERGE£¬ÆäÖÐInnoDBÌṩÊÂÎñ°²È«±í£¬ÆäËû´æ´¢ÒýÇ涼ÊÇ·ÇÊÂÎñ°²È«±í¡£ 
MyISAMÊÇMySQLµÄĬÈÏ´æ´¢ÒýÇæ¡£MyISAM²»Ö§³ÖÊÂÎñ¡¢Ò²²»Ö§³ÖÍâ¼ü£¬µ«Æä·ÃÎÊËٶȿ죬¶ÔÊÂÎñÍêÕûÐÔûÓÐÒªÇó¡£ 
InnoDB´æ´¢ÒýÇæÌṩÁ˾ßÓÐÌá½»¡¢»Ø¹öºÍ±ÀÀ£»Ö¸´ÄÜÁ¦µÄÊÂÎñ°²È«¡£µ«ÊDZÈÆðMyISAM´æ´ ......

C# Á¬½ÓMySqlµÄ·½·¨


1.´Óhttp://prdownloads.sourceforge.net/mysqldrivercs/MySQLDriverCS-n-EasyQueryTools-3.0.18.exe?downloadÉÏÏÂÔØMySQLDriverCS. 
2.°ÑMySQLDriverCS.dll.Ìí¼Óµ½.netµÄ×é¼þ 
3.ʹÓ÷½·¨ 
 ÏÂÃæÊÇ´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó:
ÏÂÃæÊÇ´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó:
using MySQLDriverCS;
MySQLConnection conn ......

MYSQL³õѧÕßʹÓÃÖ¸ÄÏ

Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql –hÖ÷»úµØÖ· –uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂ룬Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£º ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ