.netÁ´½ÓmysqlÊý¾Ý¿â£¬²Ù×÷Ôöɾ¸Ä²é¡£
ÁíÍâMySql¹Ù·½³öÁËÒ»¸öÔÚcsharpÀïÃæÁ¬½ÓMySqlµÄConnector£¬¿ÉÒÔÊÔÊÔ
http://dev.mysql.com/downloads/#connector-net
<add name="mysql" connectionString="server=125.46.37.170;uid=root;pwd=;"/>
±¨´í£ºUnable to connect to any of the specified MySQL hosts.
½ñÌì×öÏîĿʱºò¾ÍÓöµ½ÕâÎÊÌâ
ÖÐÎÄÌáʾ“ÕÒ²»µ½ÏàÓ¦µÄÖ÷»ú¡£”
ÕâʱºòÇë¼ì²éÊý¾Ý¿â·þÎñÆ÷ÉÏ MySql.Data.dll Îļþ°æ±¾ºÍÏîÄ¿ bin Ŀ¼Ïµİ汾ÊÇ·ñÒ»Ö¡£
Èç¹ûÔ¶³ÌÖ÷»ú°æ±¾ÊÇ 6.0.3
¶øÏîÄ¿ÒýÓõÄÊÇ 5.0.3
Ôò»á³öÏÖÒÔÉϵĴíÎóÌáʾ
µ«ÊÇÈç¹û±¾»úÖ÷»úÉÏ°æ±¾ÊÇ 6.0.3
¼´Ê¹ÏîÄ¿ÒýÓõÄÊÇ 5.0.3
Ò²ÄÜÕý³£Á¬½ÓÊý¾Ý¿â£¬²»Çå³þÊÇʲôÔÒò
c# asp.net MySql.Data.DLL6.2ÏÂÔØ,.netÁ¬½ÓmysqlÊý¾Ý¿âµÄµÚÈý·½²å¼þ
¹Ø¼ü×Ö: c# mysql.data.dll 6.2 ÏÂÔØ .net Á¬½Ó mysql Êý¾Ý¿â µÚÈý·½ ²å¼þ data dll
½âѹºóÖ»ÐèÒª°Ñmysql.data.dllÒýÈëµ½ÏîÄ¿Àï¾Í¿ÉÒÔÓÃÁË
´úÂëʾÀý:
C#´úÂë < id="Player1272445987149" type="application/x-shockwave-flash" width="14" height="15" src="http://heisetoufa.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" tplayername="SWF" splayername="SWF" id="Player1272445987149" type="application/x-shockwave-flash" src="http://heisetoufa.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" mediawrapchecked="mediawrapchecked" flashvars="clipboard=using%20MySql.Data.MySqlClient%3B%0A%0Aprotected%20void%20btn_login_Click(object%20sender%2C%20EventArgs%20e)%0A%7B%0A%09string%20mySqlCon%20%3D%20ConfigurationManager.ConnectionStrings%5B%22MySqlCon%22%5D.ConnectionString%3B%0A%0A%09MySqlConnection%20myCon%20%3D%20new%20MySqlConnection(mySqlCon)%3B%0A%0A%09try%0A%09%7B%0A%09%09myCon.Open()%3B%0A%0A%09%09MySqlCommand%20selSql%20%3D%20new%20MySqlCommand(%22Select%20*%20from%20tt.table%20Where%20uname%3D%40uname%22%2C%20myCon)%3B%0A%09%09%09%0A%09%09selSql.Parameters.Add(%22%40uname%22%2C%20MySqlDbType.VarChar%2C%2032).Value%20%3D%20this.txt_name.Text.Trim()%3B%0A%0A%09%09MySqlDataReader%20mydr%20%3D%20selSql.ExecuteReader()%3B%0A%0A%09%09while%20(mydr.Read())%0A%09%09%7B%0A%09%09%09if%20(my
Ïà¹ØÎĵµ£º
ÁªºÏMySQL Proxy ºÍMySQL Cluster£¬¹¹½¨¸ßÐÔÄÜÊý¾Ý¿â
ÔÎÄ£ºhttp://blogs.mysql.com/kaj/2007/12/10/combining-mysql-proxy-with-mysql-cluster/
²»¾ÃÇ°£¬ÎÒºÍStewart Smith, Vinay Joosery, Monty Taylor ÒÔ¼°ÆäËûµÄmysqlʹÓÃÕߣ¨ËûÃDZÈÎÒ¸üÊìϤMySQL Cluster £©Õ¹¿ªÁËÒ»´ÎÌÖÂÛ£ ......
·Ï»°²»ËµÁË£¬Ö±½Ó½øÈëÖ÷Ì⣬C# ODBC·ÃÎÊMySQLÊý¾Ý¿â£º
1.°²×°Microsoft ODBC.net£ºÎÒ°²×°µÄÊÇmysql-connector-odbc-3.51.22-win32.msi
2.°²×°MDAC 2.7»òÕ߸ü¸ß°æ±¾£ºÎÒ°²×°µÄÊÇmdac_typ.exe 2.7¼òÌåÖÐÎÄ°æ
3.°²×°MySQLµÄODBCÇý¶¯³ÌÐò£ºÎÒ°²×°µÄÊÇ odbc_net.msi
4.¹ÜÀí¹¤¾ß -> Êý¾ÝÔ´ODBC –>ÅäÖÃDSN… ......
mysql> select * from tx;
+------+
| id |
+------+
| 4 |
| 7 |
| 3 |
| 9 |
| 5 |
+------+
5 rows in set (0.05 sec)
mysql> delete a from tx a inner join (select * from tx limit 2,2) b ......
Èç¹ûͬÒâϵͳÖÐͬʱ´æÔÚinstall mysqlºÍno—install mysql£¬ÄÇôÔõÑù½øÐÐÁ½¸ö°æ±¾µÄÇл»Ê¹ÓÃÄØ£¿ÓÖ»áÓöµ½Ê²Ã´ÑùµÄÎÊÌâÄØ£¿
Ê×ÏÈ£¬install mysqlµÄmysql·þÎñÊÇĬÈÏÆô¶¯µÄ£¬ÔÚÈÎÎñ¹ÜÀíÆ÷½ø³ÌÖпÉÒÔ¿´µ½¼¸ÌõsqlµÄ×ÖÑÛ£¬Èçmysqld.exe,sqlbrowser¡£ÕâÊÇinstall mysqlµÄ·þÎñ¡£ÄÇôͨ¹ý¿ì½Ý·½Ê½»ònavicat¾ÍÄÜÆô¶¯Ê¹ÓÃinstall ......
DATETIME¡¢DATE ºÍ TIMESTAMP ÀàÐÍÊÇÏàËƵġ£±¾ÆªÃèÊöÁËËüÃǵÄÌØÐÔÒÔ¼°ËüÃǵÄÏàËƵãÓ벻ͬµã¡£
DATETIME ÀàÐÍ¿ÉÓÃÓÚÐèҪͬʱ°üº¬ÈÕÆÚºÍʱ¼äÐÅÏ¢µÄÖµ¡£MySQL ÒÔ 'YYYY-MM-DD HH:MM:SS' ¸ñʽ¼ìË÷ÓëÏÔʾ DATETIME ÀàÐÍ¡£Ö§³ÖµÄ·¶Î§ÊÇ '1000-01-01 00:00:00' µ½ '9999-12-31 23:59:59'¡£(“Ö§³Ö”µÄº¬ÒåÊÇ£¬¾¡¹Ü¸üÔ ......