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

.NETÁ¬½ÓMySqlÊý¾Ý¿âµÄ·½·¨¼°Ê¾Àý

·½·¨Ò»£º
ʹÓÃMySQLÍƳöµÄMySQL Connector/Net×é¼þ£¬ ¸Ã×é¼þÊÇMySQLΪADO.NET·ÃÎÊMySQLÊý¾Ý¿âÉè¼ÆµÄ.NETרÓ÷ÃÎÊ×é¼þ¡£Íê³É¸Ã×é¼þºó£¬ÐèÒªÔÚÏîÄ¿ÖÐÒýÓÃÕâ¸ö×é¼þ£¬Ò²¿ÉÒÔÖ±½ÓÔÚÅäÖÃÎļþµÄ<assemblies>½ÚµãÄÚÌí¼ÓÏÂÃæµÄ½Úµã£º
<add assembly="MySql.Data, Version=5.1.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
Ö®ºóÔÚ³ÌÐòÖÐÒýÓÃÃüÃû¿Õ¼äMySql.Data.MySqlClient£¬¼´¿É¿ªÊ¼½øÐÐÁ¬½ÓMySQLÊý¾Ý¿âµÄ²Ù×÷ÁË£¬Ê¾ÀýÈçÏ£º
 
 1protected void MySqlCon()
 2{
 3        //Êý¾Ý¿âÁ¬½Ó×Ö·û´®¸úÁ¬½ÓSQL SERVERûÓÐÇø±ð
 4        string constr = "server=localhost;User Id=root;password=root;Database=test";
 5
 6        //ÏÂÃæʹÓÃMySql Connector/netÌṩµÄרÓöÔÏó
 7        MySqlConnection mycon = new MySqlConnection(constr);
 8        mycon.Open();
 9        MySqlCommand mycmd = new MySqlCommand("select * from users", mycon);
10        MySqlDataReader myreader = mycmd.ExecuteReader();
11        while (myreader.Read())
12        {
13            if (myreader.HasRows)
14            {
15                Response.Write(myreader.GetString("email") + "<br/>");
16            }
17        }
18        myreader.Close();
19        mycon.Close();
20
21}
·½·¨¶þ£º
ʹÓÃODBC.NET¡£Ò»°ãÀ´Ëµ£¬ODBC.NETµÄDataProviderÊDZê×¼µÄ.NET¿ò¼Ü£¨1.1¼°ÒÔÉϵİ汾£©µÄÒ»²¿·Ö£¬ËùÒÔ»áºÍºóÕßÒ»Æð×Ô¶¯°²×°ºÃ¡£Ò


Ïà¹ØÎĵµ£º

Mysql data to long´íÎóµÄ´¦Àí·½·¨

½ñÌìÔÚдʵϰÉúµÄÅàѵPPTʱ£¬ÓÃmysqlµÄcommand line client²åÈëÒ»Ìõ´øÖÐÎĵļǼʱ£¬±¨data to longµÄ´íÎó£¬
ÔÚÍøÉϲ鿴ÁËÏà¹Ø×ÊÁÏ£¬ËµµÄÊÇÒòΪÕâ¸öconsoleʹÓÃÁËÒ»ÖÖ±àÂ뷽ʽ£¬°ÑÃüÁî±àÂëºóÔÙ·¢Ë͵½Êý¾Ý¿â£¬¾ßÌåÇë²Î¿´http://www.cnblogs.com/ovliverlin/archive/2007/11/26/972549.html£¬ËµµÄ±È½ÏÏêϸ£¬±¾ÈË¿´Íêºó£¬Ö±½Ó ......

ÔÙ̸mysqlµÄÅäÖÃÎļþmy.ini or my.cnf (Ö®¶þ)

ÈçÈôתÔØ£¬Çë×ðÖظöÈËÀͶ¯£¬Îñ±Ø×¢Ã÷ԭʼ³ö´¦£º(http://blog.csdn.net/iihero/archive/2010/05/13/5585039.aspx)
±¾ÎÄΪiihero@CSDNÔ­´´¡£
ÔÚǰһƪ¶ÌÎÄÀïÌáµ½ÁËmy.ini/cnfµÄ¼ÓÔØ˳Ðò£ºC:\WINDOWS\my.cnf->C:\WINDOWS\my.ini->C:\my.cnf ->C:\my.ini ->$installdir\my.ini¡£(%MYSQL_HOME%\my.ini)-> ......

Mysql ѧϰ ³£ÓÃÃüÁî


1Â¥



Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u root -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂë.×¢ÒâÓû§ÃûÇ°¿ÉÒÔÓпոñÒ²¿ÉÒÔûÓпոñ£¬µ«ÊÇÃÜÂëÇ°±ØÐëÃ»Ó ......

·þÎñÆ÷µÄmysqlÀÏÊÇÔËÐÐÒ»¶Îʱ¼ä,×Ô¶¯Í£Ö¹

¡¡Ò»Ö±À§ÈÅÎÒ¿ì°ëÄêµÄÎÊÌâÖÕÓڵõ½½â¾ö, ·þÎñÆ÷µÄmysqlÀÏÊÇÔËÐÐÒ»¶Îʱ¼ä,×Ô¶¯Í£Ö¹ÁË,±ØÐëÊÖ¶¯Æô¶¯. !
¡¡¡¡ÎÒÕÒÆ«ÍøÉÏËùÓеķ½·¨,µ«Ã»ÓÐÒ»¸öÄܽâ¾ö,ʲôÐÞ¸ÄÅäÖÃÎļþ°¡.¶¨Ê±Æô¶¯.¶¼Ã»Ð§¹û. ¸ù¾Ýר¼Ò¹Û²ì£¬ÕâÑùµÄÀíÂÛºÍÏÖÏó¶¼ÊÇÖµµÃ¸÷λվ³¤Éî˼µÄ£¬ËùÒÔÏ£Íû´ó¼Ò¶à×öÑо¿Ñ§Ï°£¬ÕùÈ¡×ܽá³ö¸ü¶à¸üºÃµÄ¾­Ñé!
¡¡¡¡Õâ¸ö·½·¨ÊÇÎÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ