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

Tomcat6 mysql jdbcÁ¬½Ó³ØµÄÅäÖÃ

 ÅªÁËÒ»ÍíÉÏ£¬²éÁËn¶àÎÄÕ£¬³¢ÊÔÁËn¶à¸´Ôӵķ½·¨£¬×îºóÖÕÓÚÔÚһƪÎÄÕÂÖÐÕÒµ½ÁËÒ»¸ö³¬¼òµ¥µÄ·½·¨£¬ÕæÊÇ̤ÆÆÌúЬÎÞÃÙ´¦°¡£¡²»Óð´Õչܷ¨µÄ×ö·¨£¬Ö»Òª°´ÕÕÏÂÎĵķ½·¨±£¹ÜÄã¿ÉÒԳɹ¦ÅäÖÃtomcatµÄÁ¬½Ó³Ø¡£
½«tomcat/conf/context.xmlÎļþÖÃΪÒÔÏÂÄÚÈÝ¡£
<Context reloadable="true">
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"
     maxActive="100" maxIdle="30" maxWait="10000" username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost:3306/dataBaseName"/>
</Context>
»òÕß½«Æä·ÅÔÚÄ㹤³ÌµÄMETA-INFÏÂÃæ¡£myslq±íºÍÊý¾Ý¿âÇý¶¯¶ÔÓ¦·ÅºÃλÖã¬Ò»¶¨ÄÜÁ¬ÉÏ£¡


Ïà¹ØÎĵµ£º

mysql µÄ×Ö·û±àÂë

 === ÉÔºóÔÙÕûÀí
mysql
4.0µ½mysql
5.0µÄÊý¾Ýµ¼Èë³öÏÖÂÒÂëµÄ½â¾ö·½°¸
×ÖÌå´óС£º´ó
| ÖÐ
| С
2007-02-08 17:09 -
ÔĶÁ£º485 - ÆÀÂÛ
£º0
×î½ü×ömysql
4.0µ½mysql
5.0µÄÊý¾Ýת»¯¹¤×÷£¬·¢ÏÖÂÒÂë
ÎÞÊý£¬¹Û²©¿ÍÎÞÊýÐĵÃÈçÏ£º
£ªmysql
ÖÐÎÄ亂碼µÄÔ­Òò
mysql
會³ö現ÖÐÎÄ ......

ÔÚSQLÖÐʹÓÃnow()µ¼ÖµÄÐÔÄÜϽµ(MySQL)

×öÊý¾Ý¿âµ÷ÓÅ£¬Ò»¸ö¼òµ¥µÄtip¾ÍʹÐÔÄÜÌáÉýÒ»´ó¿éʱ£¬±»°ïÖúµÄÈË×ÔÈ»ÊǸßÐ˶øÇҸм¤£¬ÎÒÒ²ÊÇÂúÐÄ»¶Ï²¡£ÓÃËùѧ°ïÖúÁËËûÈË£¬Ò²ËµÃ÷»¹ÊÇÓÐÒ»¼¼Ö®³¤µÄ£¬ÓÐÒ»ÃÅÄܹ»Ñø»î×Ô¼ºµÄÊÖÒÕ¡£Ò²ËãÊÇÊÖÒÕÈË°¡¡£
ͬÊÂÈÃÎÒ°ïÖúÓÅ»¯£¬ÔÚslow query logÀï·¢ÏÖÓÐÁ½¸öSQLÖ´ÐеĴÎÊý×î¶à£¬²¢ÇÒÿ´Î¶¼ÔÚÁ½ÃëÒÔÉÏ¡£ÓÃexplain¿´ÁË£¬Ò²Î´·¢ÏÖË÷ÒýʹÓ÷ ......

Ó°ÏìMysqlÐÔÄܵļ¸¸öÖØÒª²ÎÊý˵Ã÷

innodb_buffer_pool_size
Èç¹ûÓÃInnodb£¬ÄÇôÕâÊÇÒ»¸öÖØÒª±äÁ¿¡£Ïà¶ÔÓÚMyISAMÀ´Ëµ£¬Innodb¶ÔÓÚbuffer size¸üÃô¸Ð¡£MySIAM¿ÉÄܶÔÓÚ´óÊý¾ÝÁ¿Ê¹ÓÃĬÈϵÄkey_buffer_sizeÒ²»¹ºÃ£¬µ«InnodbÔÚ´óÊý¾ÝÁ¿Ê±ÓÃĬÈÏÖµ¾Í¸Ð¾õÔÚÅÀÁË¡£ InnodbµÄ»º³å³Ø»á»º´æÊý¾ÝºÍË÷Òý£¬ËùÒÔ²»ÐèÒª¸øϵͳµÄ»º´æÁô¿Õ¼ä£¬Èç¹ûÖ»ÓÃInnodb£¬¿ÉÒÔ°ÑÕâ¸öÖµÉèΪ ......

ÖØÐÂÕÒµ½MySQLÊý¾Ý¿âµÄrootÃÜÂë

 Unix&Linux£º
1.ÓÃroot»òÕßÔËÐÐmysqldµÄÓû§µÇ¼ϵͳ£»
2£®ÀûÓÃkillÃüÁî½áÊøµômysqldµÄ½ø³Ì£»
3£®Ê¹ÓÃ--skip-grant-tables²ÎÊýÆô¶¯MySQL Server
shell>mysqld_safe --skip-grant-tables &
4.Ϊroot@localhostÉèÖÃÐÂÃÜÂë
shell>mysqladmin -u root flush-privileges password "newpassword" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ