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

mysql JDBC URL¸ñʽ¼°Æä²ÎÊý˵Ã÷

×î½üÓöµ½ÕâÑùµÄÎÊÌâ
»á±¨at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:824)
at com.zycy.db.DbTrans.executeQuery(DbTrans.java:127)
ÕâÑùµÄ´íÎó£¬ÖØÆôTomcat·þÎñºó¾ÍºÃÁË£¬µ«ÊǹýÒ»ÍíÉϾÍÓгöÏÖÕâÑùµÄÎÊÌâ
mysql JDBC URL¸ñʽÈçÏ£º
jdbc:mysql://[host:port],[host:port].../[database][?²ÎÊýÃû1][=²ÎÊýÖµ1][&²ÎÊýÃû2][=²ÎÊýÖµ2]...
³£Óõļ¸¸ö½ÏΪÖØÒªµÄ²ÎÊý£º
²ÎÊýÃû³Æ
²ÎÊý˵Ã÷
ȱʡֵ
×îµÍ°æ±¾ÒªÇó
user
Êý¾Ý¿âÓû§Ãû£¨ÓÃÓÚÁ¬½ÓÊý¾Ý¿â£©
 
ËùÓа汾
password
Óû§ÃÜÂ루ÓÃÓÚÁ¬½ÓÊý¾Ý¿â£©
 
ËùÓа汾
useUnicode
ÊÇ·ñʹÓÃUnicode×Ö·û¼¯£¬Èç¹û²ÎÊýcharacterEncodingÉèÖÃΪgb2312»ògbk£¬±¾²ÎÊýÖµ±ØÐëÉèÖÃΪtrue
false
1.1g
characterEncoding
µ±useUnicodeÉèÖÃΪtrueʱ£¬Ö¸¶¨×Ö·û±àÂë¡£±ÈÈç¿ÉÉèÖÃΪgb2312»ògbk
false
1.1g
autoReconnect
µ±Êý¾Ý¿âÁ¬½ÓÒì³£ÖжÏʱ£¬ÊÇ·ñ×Ô¶¯ÖØÐÂÁ¬½Ó£¿
false
1.1
autoReconnectForPools
ÊÇ·ñʹÓÃÕë¶ÔÊý¾Ý¿âÁ¬½Ó³ØµÄÖØÁ¬²ßÂÔ
false
3.1.3
failOverReadOnly
×Ô¶¯ÖØÁ¬³É¹¦ºó£¬Á¬½ÓÊÇ·ñÉèÖÃΪֻ¶Á£¿
true
3.0.12
maxReconnects
autoReconnectÉèÖÃΪtrueʱ£¬ÖØÊÔÁ¬½ÓµÄ´ÎÊý
3
1.1
initialTimeout
autoReconnectÉèÖÃΪtrueʱ£¬Á½´ÎÖØÁ¬Ö®¼äµÄʱ¼ä¼ä¸ô£¬µ¥Î»£ºÃë
2
1.1
connectTimeout
ºÍÊý¾Ý¿â·þÎñÆ÷½¨Á¢socketÁ¬½ÓʱµÄ³¬Ê±£¬µ¥Î»£ººÁÃë¡£ 0±íʾÓÀ²»³¬Ê±£¬ÊÊÓÃÓÚJDK 1.4¼°¸ü¸ß°æ±¾
0
3.0.1
socketTimeout
socket²Ù×÷£¨¶Áд£©³¬Ê±£¬µ¥Î»£ººÁÃë¡£ 0±íʾÓÀ²»³¬Ê±
0
3.0.1
¶ÔÓ¦ÖÐÎÄ»·¾³£¬Í¨³£mysqlÁ¬½ÓURL¿ÉÒÔÉèÖÃΪ£º
jdbc:mysql://localhost:3306/test?user=root&password=&useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false
ÔÚʹÓÃÊý¾Ý¿âÁ¬½Ó³ØµÄÇé¿öÏ£¬×îºÃÉèÖÃÈçÏÂÁ½¸ö²ÎÊý£º
autoReconnect=true&failOverReadOnl


Ïà¹ØÎĵµ£º

MySQL 5.1ÐÂÌØÐÔ֮ʼþµ÷¶ÈÆ÷(Event Scheduler)

À´×Ô£ºhttp://www.sofee.cn/blog/2007/07/18/91/
MySQL 5.1ÐÂÌØÐÔ֮ʼþµ÷¶ÈÆ÷(Event Scheduler)
CREATE-EVENT, cron, Event-Scheduler, ´¥·¢Æ÷, ¼Æ»®ÈÎÎñ, MySQL,Triggers, Ê¼þµ÷¶ÈÆ÷, ×÷Òµµ÷¶È
July 18, 2007 at 20:34:50 · Filed under MySQL
Ò»¡¢Ç°ÑÔ
×ÔMySQL5.1 ......

mysql´¦Àíº£Á¿Êý¾ÝµÄÓÅ»¯ÅäÖÃ

³£³£Óöµ½´óÊý¾ÝÁ¿Æµ·±¶ÁдÊƱػᵼÖ·þÎñÆ÷µÄÐÔÄÜϽµ¡£ÏÂÃæ¼Ç¼һ϶ÔmysqlµÄÓÅ»¯ÅäÖÃ
1.Ê×ÏȹرÕauto commit¡£
2.¶ÔÓÚÊý¾Ý±íʹÓÃInnoDB¡£
3.¹Ø±ÕÍâ¼üÔ¼Êø¡£
4.²ÉÓöàÖµ²åÈë“INSERT INTO ±íÃû VALUES (1,2), (5,5), ...;” Èç¹ûÓдóÁ¿²¢·¢¿ÉÒÔÓøü¸ÄINSERT INTOΪ INSERT DELAYED INTO¿ÉÒÔÔڳ̶ÈÉϽ⾠......

CentoS5ϱàÒë°²×°mysqlÊý¾Ý¿â

ΪʲôѡÔñÔ´Âë±àÒë°²×°mysql£ºÎÒÔÚʹÓÃrpm»òÕßÊÇyum°²×°Ê±myql£¬ÀÏÊÇÌáʾÎÒÕÒ²»µ½*.sockÎļþ£¬ÕÒÁ˵ã
×ÊÁÏ˵ÊǸðüÊǷǹٷ½°æ±¾£¨Ã÷Ã÷Êǹٷ½ÏÂÔØ µÄ£©£¬ÆäÖÐÔ­Òòµ½ÏÖÔÚ»¹Ã»ÓиãÇå³þ¡£Ï£ÍûÖªÇéÈËÊ¿¸æÖª¡££¨¿ªÊ¼±àÒëµÄʱºò£¬ÏµÍ³»·¾³Ò»¶¨ÒªÅäÖúã¬GCC£¬GC++...µÈµÈµÄ±àÒëÆ÷Ò»¶¨Òª×öºÃ,±¾È˵ÄcentosÓÉÓÚ¿ªÊ¼
ϵͳ»·¾³Ã»ÅäÖ ......

C#.NETÁ¬½Ómysql·½·¨

Ò»¡£ mysql.data.dll¿½±´µ½binÏÂÃæ²¢ÒýÓÃÒ»ÏÂ
using MySql.Data.MySqlClient;
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string myConnectionString ......

MySQLµÄÍâ¼üºÍ²ÎÕÕÍêÕûÐÔ

Ò»¡¢²ÎÕÕÍêÕûÐÔ(Referential integrity)ºÍÍâ¼ü(foreign key)
²ÎÕÕÍêÕûÐÔ(Referential integrity)ÊÇÓÃÓÚÔ¼¶¨Á½¸ö¹Øϵ֮¼äµÄÁªÏµ£¬ÀíÂÛÉϹ涨£ºÈôMÊǹØϵSÖеÄÒ»ÊôÐÔ×飬ÇÒMÊÇÁíÒ»¹ØϵZµÄÖ÷¹Ø¼ü×Ö£¬Ôò³ÆMΪ¹ØϵS¶ÔÓ¦¹ØϵZµÄÍâ¹Ø¼ü×Ö¡£ÈôMÊǹØϵSµÄÍâ¹Ø¼ü×Ö£¬ÔòSÖÐÿһ¸öÔª×éÔÚMÉϵÄÖµ±ØÐëÊÇ¿ÕÖµ»òÊǶÔÓ¦¹ØϵZÖÐij¸öÔª×éµÄÖ÷¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ