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

java¶ÔmysqlÊý¾Ý¿âµÄµ¼Èëµ¼³ö

//µ¼³ö
String mysql="mysqldump -uroot -proot  --opt databasename > d:/test.sql";    
java.lang.Runtime.getRuntime().exec("cmd /c "+mysql);   
//µ¼Èë
String mysql="mysqladmin -uroot -proot create databasename";    
java.lang.Runtime.getRuntime().exec("cmd /c "+mysql);    
path="mysql databasename < d:/test.sql";    
java.lang.Runtime.getRuntime().exec("cmd /c "+path); 


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

¾ßÓиºÔؾùºâ¹¦ÄÜMySQL·þÎñÆ÷¼¯Èº²¿ÊðʵÏÖ

À´×Ô£ºhttp://it.china-b.com/zx/linuxsjk/20090525/24129_1.html
ÕªÒª£ºMySQLÊÇÒ»¸ö¸ßËٶȡ¢¸ßÐÔÄÜ¡¢¶àÏ̵߳ĹØϵÐÍÊý¾Ý¿â
ÖÎÀíϵͳ£¬ÊÊÓÃƽ̨¶à£¬¿ÉÀ©Õ¹ÐÔÇ¿¡£ÔÚʵ¼ÊÉú²ú»·¾³ÖУ¬²¿ÊðºÍʵÏÖ¾ßÓÐÒ»¶¨¸ºÔؾùºâ¹¦ÄܵÄMySQL·þÎñÆ÷¼¯Èº£¬¶ÔÓÚÌá¸ßÓû§Êý¾Ý¿â
Ó¦ÓÃϵͳµÄÐÔÄÜ¡¢ËٶȺÍÎȶ¨ÐÔ¾ßÓÐÃ÷ÏÔµÄ×÷Óᣱ¾ÎļòÒª½éÉÜÁËÔÚ ......

MySQLÖÐselect * for updateËø±íµÄÎÊÌâ


select * for updateËø±íµÄÎÊÌâ
ÓÉÓÚInnoDBÔ¤ÉèÊÇRow-Level Lock£¬ËùÒÔÖ»ÓС¸Ã÷È·¡¹µÄÖ¸¶¨Ö÷¼ü£¬MySQL²Å»áÖ´ÐÐRow lock (Ö»Ëøס±»Ñ¡È¡µÄ×ÊÁÏÀý) £¬·ñÔòMySQL½«»áÖ´ÐÐTable Lock (½«Õû¸ö×ÊÁÏ±íµ¥¸øËøס)¡£
¾Ù¸öÀý×Ó:
¼ÙÉèÓиö±íµ¥products £¬ÀïÃæÓÐid¸úname¶þ¸öÀ¸Î»£¬idÊÇÖ÷¼ü¡£
Àý1: (Ã÷È·Ö¸¶¨Ö÷¼ü£¬²¢ÇÒÓд˱Ê×ÊÁÏ£¬ ......

MySQLѧϰ(1)Procedure,TRIGGER,FUNTCION

MySQLµÄÒ²Ö§³Ö´æ´¢¹ý³Ì£¬º¯Êý£¬´¥·¢Æ÷¡£
ÒÔϸ÷¸ö¹¦ÄܵÄÏêÊö£¬Ö÷ÒªÊÇʾÀý¡£
/**1.¶¨Òå·Ö¸î·û*/
DELIMITER //
/**2.´´½¨º¯Êý-¼ÆËãÁ½ÊýÖ®ºÍ*/
CREATE FUNCTION f_sum(num1 INT,num2 INT) RETURNS INT
BEGIN
RETURN num1+num2;
END;
//
/**
*3.´´½¨´æ´¢¹ý³Ì
*˼·£º3.1.Óиô洢¹ý³ÌÔòɾ³ý£¬3.2ÓÐʹÓõÄÖмä±í ......

MySQLѧϰ(2)ʱ¼äÀàÐÍ

DAT_E,TIM_E,DAT_ETIME,TIM_ESTAMP,Y_EAR
MySQLÖ§³Ö¶àÖÖ¸ñʽ»¯·½Ê½£¬²åÈëʱ¿ÉÒÔÊÇ×Ö·û´®£¬¿ÉÒÔʹÊý×Ö¡£
MySQL´ú±í×Ö·û´®µÄ·½Ê½ÓÐÁ½ÖÖ£¬Ò»Êǵ¥ÒýºÅ£¬ÁíÒ»ÖÖÊÇË«ÒýºÅ¡£
ÓÖÒ»´ÎÌύʧ°Ü£¬¿´À´CSDNµÄBUG»¹ÊǺܴóµÄ¡£
Ô­Òò»ù±¾È·¶¨£¬ÊÇÒòΪDATE£¬TIME£¬DATETIME£¬TIMESTAMP£¬YEARΪMySQLÊý¾ÝµÄ¹Ø¼ü×Ö£¬Ò²ÊÇÆäËûÊý¾Ý¿âµÄ¹Ø¼ü× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ