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

java mysqlÁ¬½ÓÊý¾Ý¿â´úÂë

package com.lovo.cq.shopping10_1.common;
import java.sql.*;
public class DbUtil {
private PreparedStatement pstmt = null;
private Connection con = null;
public DbUtil() {
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost/ShoppingBook10_1",
"root", "root");;
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
public Connection getCon() {
return con;
}
public void close() {
if (pstmt != null) {
try {
pstmt.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if (con != null) {
try {
con.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
}


Ïà¹ØÎĵµ£º

MySQL Archive Storage Engine

The MySQL 5.0 Archive Storage Engine
http://dev.mysql.com/tech-resources/articles/storage-engine.html
Ìص㣺
1.²»Ö§³ÖÈκÎË÷Òý£¬µ«Ê¹Óòéѯ»º´æ
2.¸ù¾Ýmysql¹¤³ÌʦµÄ˵·¨£¬µ±±í´óС´ïµ½1.5Gʱ£¬±íɨÃèarchiveʱ¼äÉÙÓÚmyisam±í
3.Èç¹ûÄãÏë¸Ä±äÆäËû´æ´¢ÒýÇæµÄ±íµ½archiveÒýÇ棬ÇëÏÈdropÏÂÈκÎË÷Òý
4.myisam¿ÉÒÔÓ ......

MySQL Query Cache

A Practical Look at the MySQL Query Cache
http://dev.mysql.com/tech-resources/articles/mysql-query-cache.html
Êý¾Ý¿â»º´æ²ßÂÔ£º
£¨1£©»º´æ¾­³£±»Ê¹ÓõÄÊý¾Ý
£¨2£©»º´æ¾­³£Ö´ÐеÄSQLºÍ´æ´¢¹ý³Ì´úÂë
£¨3£©»º´æÊý¾Ý¿âÔªÊý¾ÝÐÅÏ¢£¬°üÀ¨£º¶ÔÏó½á¹¹»º´æ¡¢°²È«ÐÅÏ¢µÈ
mysqlÒýÇæËùʹÓõĻº´æ£º
£¨1£©myisam:key b ......

jBPM4ÖÐÅäÖÃMySQLµÄhibernate·½ÑÔ

×î³õµÄjbpm.hibernate.cfg.xmlÖУ¬¶ÔMySQLµÄ·½ÑÔÅäÖóÉÁËorg.hibernate.dialect.MySQLDialect£¬·¢²¼Á÷³ÌµÄʱºòÓöµ½ÏÂÊö´íÎó£º
Cannot delete or update a parent row: a foreign key constraint fails
Could not synchronize database state with session
½«MySQL·½ÑÔÐÞ¸ÄΪorg.hibernate.dialect.MySQLInnoDBDialectÎÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ