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

MySQL Ìí¼ÓÍâ¼ü

MySQL Ìí¼ÓÍâ¼ü
DROP TABLE IF EXISTS `nation`;
CREATE TABLE `nation`(
    `pii_Nation` smallint(2) unsigned NOT NULL default '0',
    `pii_NatinoName` varchar(40) NOT NULL default '',
    PRIMARY KEY  (`pii_Nation`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `userinfo`;
CREATE TABLE `userinfo` (
    `ID` char(18) NOT NULL default '',
    `Name` varchar(20) NOT NULL default '',
    `Sex` varchar(2) NOT NULL default 'ÄÐ',
    `pii_Nation` smallint(2) unsigned NOT NULL default '0',
    PRIMARY KEY  (`ID`),
    FOREIGN KEY (`pii_Nation`) references nation(`pii_Nation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


Ïà¹ØÎĵµ£º

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ÎÊ ......

ºöÂÔmysqlµÄkey cache hit ratio

Why you should ignore MySQL’s key cache hit ratio
http://www.mysqlperformanceblog.com/2010/02/28/why-you-should-ignore-mysqls-key-cache-hit-ratio/
²»ÒªÏàÐÅmysqlµÄkey cache hit ratio£º
key cache hit ratio = 1 - key_reads / key_read_requests
key_reads:´Ó´ÅÅÌÖжÁ¿éµÄÊýÁ¿
key_read_request ......

mysql ½«±íÖÐÊý¾Ýµ¼³ö £¨linux£©

½ñÌìÓöµ½Òªµ¼³öÊý¾Ý¿âÖбíµÄÊý¾Ý¡£ÏÂÃæÕâ¸ö¾Í¿ÉÒԸ㶨¡£¡£
#µ¼³öÖ¸¶¨µÄ±í #µ¼³öÃüÁî -uÓû§Ãû -pÃÜÂë -hÖ÷»úIPµØÖ· Êý¾Ý¿âÃû ±íÃû1 ±íÃû2 > µ¼³öÎļþ.sql
mysqldump -uroot -proot -h192.168.0.88 ok_db oktable1 oktable2 > ok_db.sql
ÁíÍâÔÚ¸ü¸ÄmysqlÃÜÂëʱºò£¬ÍøÉÏÓÐЩÃüÁî²»¶Ô£º
ÎÒÓÃÈçÏ£ºset password=pas ......

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://l ......

Linux Ï mysql µÄÏà¹ØÃüÁî

1.µÇ¼£º mysql -uroot -p
2.LinuxÏÂmysql ²»ÄÜÍâÍø·ÃÎÊ
  
   ÒѾ­ÔÚMYSQLÀïgrantÁËȨÏÞÁË¡£ÔÚÍâÍø»¹ÊDz»ÄÜ·ÃÎÊ .
   ÎÊÌ⣺
   cat  /etc/mysql/my.conf
   ÕÒµ½ÏÂÃæÒ»ÐÐ
   bind-address   = 127.0.0.1
   Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ