Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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[ÃüÁîÐÐÏÂ]µ¼Èëµ¼³ö´óÊý¾Ý·½·¨£¡


2007-11-16 15:37
½ñÌì¿´×ÅÊÖ²áÊÔÁËÏ£¬·¢ÏÖÔ­À´´óÊý¾Ýµ¼Èëµ¼³öÊÇÄÇôµÄÇáËÉ£¨²»ÊǺܴó£¬200¶àMµÄÎı¾¶øÒÔ£©
×¢Ò⣺Èç¹û·¢ÏÖMYSQL unknown command '\'ÕâÑùµÄÌáʾ£¬ÔòÉèÖÃһϷþÎñÆ÷µÄ×Ö·û¼¯£¬È磺
mysql -uroot -ppasspass --default-character-set=utf8 databaseName <d:bakcup.sql
ÕâÑù¾Í²»»á±¨´íÁË£¬^_^
µ¼³ö ......

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

ÈçÈôתÔر¾ÎÄ£¬Çë×¢Ã÷ԭʼ³ö´¦£ºhttp://hi.baidu.com/hexiong/blog/item/e860e5dd9b0d3ae376c6381a.html
(hexiong@baidu or iihero@CSDN)
ż¶ûÅöµ½ÓÐÈËÎÊʹÓÃmysqlÃüÁîÐУ¬ÀÏÈÃÈËÊäÈë--default-character-set=gbkÖ®ÀàÎÞÁĵÄÑ¡ÏÈÃÈË·³¡£ÈÃÈ˶àÊäÈëÁ˼¸¸ö×Ö·û£¬È·ÊµÓе㲻¶Ô¾¢¡£
¼ÓÉÏÓÐʱºò×Ô¼ºÓÐʱºòDIY£¬ºÜÉÙÔÚwindow ......

´ò¿ªmysqlÔ¶³Ì·ÃÎÊȨÏÞ


2009-05-05
´ò¿ªMySQLÔ¶³Ì·ÃÎÊȨÏÞ
¹Ø¼ü×Ö: mysql
1¡¢¸Ä±í·¨
¡¡¡¡¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
¡¡¡¡mysql -u root -p
mysql>use mysql;
¡¡¡¡mysql>upda ......

MySQL error 2003µÄ½â¾ö¹ý³Ì

MySQL error 2003µÄ½â¾ö¹ý³Ì¸Õ²ÅÂÛ̳³öÏÖ:
error 2003:Can't connect to MySQL server on ..............
 ÎÊÌâ:MYSQLÊý¾Ý¿âûÓÐÆô¶¯~
 ½â¾ö:°Ù¶ÈÁËÒ»ÏÂ,˵µÄ½â¾ö·½·¨¸÷ÖÖ¸÷Ñù,ºÜ¶à.
 1\ÔÚ“ÔËÐДÀïÕÒµ½C:\mysql\bin\mysqld-opt.exe ÔËÐоÍÊÇÁË£¡ÕÒÁË,ûÓÐÕâ¸ö¶«Î÷:(
2 ÔÚDosÏÂ cd \mysql ......

C#Á¬½ÓMySqlÊý¾Ý¿â·½·¨ ÓîÀ¼

1¡¢ÓÃMySQLDriverCSÁ¬½ÓMySQLÊý¾Ý¿â
ÏÈÏÂÔغͰ²×°MySQLDriverCS£¬µØÖ·£ºhttp://sourceforge.net/projects/mysqldrivercs/ÔÚ°²×°Îļþ¼ÐÏÂÃæÕÒµ½MySQLDriver.dll£¬È»ºó½«MySQLDriver.dllÌí¼ÓÒýÓõ½ÏîÄ¿ÖÐ×¢£ºÎÒÏÂÔصÄÊÇ°æ±¾ÊÇ MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe using System;using System.Collectio ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ