MYSQL ʼþµ÷¶ÈµÄÀý×Ó
1.SET GLOBAL event_scheduler = ON;
2.show processlist;
3.´´½¨Ò»¸ö±í test Ö÷Òª×ֶΠno,name,sex,age
4.¶Ô¸Ã±í²åÈ缸ÌõÊý¾Ý
5.´´½¨´æ´¢¹ý³Ìadd_age
drop procedure if exists add_age;
delimiter|
create procedure add_age()
begin
start transaction;
update eventtest set age = age +1;
commit;
end;
|delimiter;
6.¸øµ±Ç°Óû§¸³Óè´´½¨eventµÄȨÏÞ(»òÕß»»ÓÐȨÏÞµÄÓû§?)
7.´´½¨event
create event if not exists add_age_one_minutes
on schedule every 1 minute
on completion preserve
do
call add_age();
(X¸Ãeventÿ·ÖÖÓÖ´ÐÐÒ»´Î)
Ïà¹ØÎĵµ£º
Õ⼸Ìì×öÒ»¸ö²éѯ£¬ÐèÒªÔÚÒ»¸öÖ¸¶¨µÄ½á¹û¼¯ÖнøÐвéѯ£¬ÀýÈ磺
select * from table_name where doc_id IN ('1dba', 'c20a', '907b')
ÆäÖÐIN×Ó¾äÖеÄdoc_idÁбíÊÇͨ¹ýµ÷ÓÃÒ»¸öÍⲿ½Ó¿Ú»ñµÃÒ»×édoc_id³£Á¿ÁÐ±í£¬È»ºóÔÚ±¾µØ¿âÖÐËÑË÷·ûºÏÕâ¸öÁбíµÄÊý¾Ý
¼Ç¼¡£ºóÀ´·¢ÏÖmysql·µ»ØµÄ½á¹û¼¯µÄÅÅÐòÊÇ°´ÕÕÈë¿â˳Ðò¸ø³öµÄ£¬µ«ÊÇÎÒ ......
MySQL ÃüÁîÐÐ
µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö² ......
ƽʱÎÒÃÇÔÚʹÓÃMySQLÊý¾Ý¿âµÄʱºò¾³£»áÒòΪ²Ù×÷ʧÎóÔì³ÉÊý¾Ý¶ªÊ§£¬MySQLÊý¾Ý¿â±¸·Ý¿ÉÒÔ°ïÖúÎÒÃDZÜÃâÓÉÓÚ¸÷ÖÖÔÒòÔì³ÉµÄÊý¾Ý¶ªÊ§»ò×ÅÊý¾Ý¿âµÄÆäËûÎÊÌâ¡£
¡¡¡¡Ò»¡¢Êý¾Ý±¸·Ý½Ý¾¶
¡¡¡¡ÒòΪÕâ¸ö·½·¨Ã»Óеõ½¹Ù·½ÕýʽÎĵµµÄÑéÖ¤£¬ÎÒÃÇÔݳÆΪÊÔÑé°É¡£
¡¡¡¡Ä¿µÄ£º±¸·ÝhostAÖ÷»úÖÐÒ»¸öMySQLÊý¾Ý¿â±¸·ÝTestA£¬²¢»Ö¸´µ½µ½hostB»úÖÐ ......
½ö½öÊÇ¿´Ò»Ð©ÊéÊÇÁãÁãɢɢ¼Çϵģ¬¸ø×Ô¼º±¸Íü¶øÒÑ¡£½¨ÒéÈ¥¿´×¨ÒµÍøÕ¾µÄ±Ê¼Ç¡£
1.Ö÷¼üµÄÖµ±ØÐëÊÇΨһµÄ£¬²¢ÇÒ²»ÄÜΪ¿Õ£¬Õâ¿ÉÒÔÌá¸ßMySQL´Ó¶à¸ö±íÖÐÈ¡µÃÊý¾Ý»òÕßÈ¡µÃÖ¸¶¨¼üÖµ¶ÔÓ¦µÄÐеÄËٶȡ£MySQLͨ¹ýÒ»¸öÌØÊâµÄ³ÆΪIndexË÷ÒýµÄÊý¾Ý½á¹¹×öµ½ÕâÒ»µã£¬IndexÊÇÕÒµ½Ò»Ìõ¼Ç¼µÄ¿ì½Ý·½Ê½£¬¾ÍÏñͼÊé¹ÝµÄ¿¨Æ¬Ä¿Â¼¡£
2.²é¿´±íµÄÁж¨ ......
ÏàÐźܶàµÄÅóÓѶÔʹÓÃiBatis¹ÜÀíÊý¾Ý¿âºÜ²»Ï°¹ß£¬ÒòΪÎÒÃÇÒªÊÖд´úÂ룬ÌرðÊÇdynamic
query²¿·Ö¸üÊDz»ÖªÈçºÎǶÌ×£¬¶øÕâЩÊÇ¿ÉÒÔÓù¤¾ßµÄ£¡ÏÂÃæ½éÉÜÒ»ÖÖ×î³£Óõģ¡²»·Ï»°ÁË£¬Ö±½ÓÉÏÅäÖùý³Ì£¡
1¡¢»ñµÃ http://ibatis.apache.org/abator.html
Eclipse¿ÉÒÔ×Ô¶¯µÄ½øÐÐUpdate»ñÈ¡´ËPlugin ......