Òì¹¹Êý¾Ý¿âÊý¾Ýͬ²½(´ÓProgressµ½MySQL)
Ò»Ö±Ïëдµã¶«Î÷£¬µ«È´³Ù³ÙûÓпªÊ¼£¬½ñÌìÎÞÒâÖлص½ERP100Õâ¸öÍøÕ¾£¬·¢ÏÖÓÐÁËQADµÄרÇø£¬ÓÚÊÇ£¬Ò»Ê±ÈÈѪ·ÐÌÚ£¬Ð´Á˵㶫Î÷£¬¾Í½è´Ë»ú»á½«ÄÚÈÝÒ²·¢µ½ÕâÀï°É£¬ºÇºÇ¡£
ÆäʵÄÚÈݶ¼ÊDZ¾ÈËдµÄ£¬²»¹ýΪÁËͼ·½±ã£¬ÔÚERP100ÖÐдÍêÁË£¬È»ºóÖ±½ÓCopyµ½ÕâÀ͵Á˵ãÀÁ£¬ºÇºÇ¡£
ÒÔÏÂÊÇÕýÎÄ£¬ÔÚERP100ÖеĵØÖ·ÊÇ
http://bbs.erp100.com/forum.php?mod=viewthread&tid=74269&page=1&extra=#pid438182
ÓÉÓÚСµÜ½Ó´¥QADÒ²Ö»Óж̶̼¸Äêʱ¼ä£¬Ä¿Ç°Ò²Ö»ÊǸոÕÈëÃŵIJËÄñ¼¶±ð£¬Ï£Íû½è´Ë»ú»áÓëÊìϤQADÈí¼þµÄÇ°±²Ò»Æð½»Á÷£¬ºÇºÇ¡£
ÏîÄ¿Ãû³Æ£º
Òì¹¹Êý¾Ý¿âÊý¾Ýͬ²½(´ÓProgressµ½MySQL)
±³¾°½éÉÜ£º
ÎÒÏÖÔÚ¹«Ë¾Ê¹ÓõÄQAD°æ±¾ºÜÀÏ£¬ÊÇ85gµÄ£¬ÓÚÊÇ£¬ÒªÉý¼¶µ½eb2.1£¬µ«ÓÉÓÚÓкܶàË®¾§±¨±íÊÇÖ±½ÓÁ¬µ½QADºǫ́ȡÊýµÄ£¬¶øeb2.1¶ÔÁ¬½ÓÊýÏÞÖÆÔÚ1¸ö£¬Òò´Ë£¬¹«Ë¾¾ö¶¨½«QADµÄÊý¾Ýͬ²½µ¼Èëµ½MySQLÊý¾Ý¿âÖУ¬ÕâÑù£¬Ö»Òª½«Ë®¾§±¨±íµÄÁ¬½ÓÖØÐÂÖ¸ÏòMySQL£¬¾Í¿ÉÒÔÕý³£Ê¹ÓÃÁË¡£
ʵÏÖ˼·£º
ҪʵÏÖʵʱͬ²½£¬×îÖ±½ÓµÄ¾ÍÊÇ´¥·¢Æ÷ÁË£¬Í¨¹ýÔÚ´¥·¢Æ÷ÖзÖÎö¸÷×ֶεÄÖµ£¬Éú³ÉSQLÓï¾ä£¬²¢´æÈëÎı¾ÎļþÖУ¬È»ºó£¬¶¨ÆÚµ÷ÓÃÒ»¶ÎJava³ÌÐò£¬¶ÁÈ¡Îı¾ÖеÄSQLÓï¾ä£¬½«Êý¾Ý²åÈëMySQLÊý¾Ý¿âÖС£
×¢£ºµ±Ê±ÔÚÏîÄ¿·ÖÎö½×¶Î£¬Êµ¼Ê»¹ÓÐ1Ì×·½°¸£¬Ò²ÊÇͨ¹ý´¥·¢Æ÷¼Ç¼±»Ð޸ĵÄÊý¾Ý£¬È»ºóдÈëÒ»¸ö×Ô¶¨Òå±íµÄRaw×ֶΣ¬È»ºó£¬¶¨Ê±Ö´ÐÐÒ»¶ÎProgress³ÌÐò£¬½«ÐÞ¸ÄдÈëµ½MySQLÖУ¬µ«ÓÉÓÚÕâ¸ö·½°¸ÐèÒª¶àÕ¼ÓÃÒ»¸öLicence£¬Òò´Ë£¬×îÖÕ±»·ÅÆú¡£
ʵÏÖ·½·¨£º
1. ÉèÖÃTrigger
½øÈëData Dictionary(Êý¾Ý×Öµä)£¬µã Edit -> Modify Table£¬ÔÚµ¯³öµÄ´°¿ÚÖÐÊäÈëÒª½¨TriggerµÄ±íÃû£¬ÀýÈç pt_mstr£¬È»ºó£¬ÔÚÖ®ºóµÄ´°¿ÚÖУ¬ÔÚ×îÏÂÃæµÄ°´Å¥ÖпÉÒÔÕÒµ½ Trigger µÄ°´Å¥£¬½øÈ¥Ö®ºó¾Íµ½ÁËTriggerµÄÉèÖýçÃæÁË£¬ÕâÀïÎÒÃÇÖ÷ÒªÔÚ Write ºÍ Delete ÉÏÃæÉèÖÃ(Æäʵ£¬QADµÄ²Î¿¼ÊÖ²áÉϺÃÏñÊÇÍƼöµÄReplication-Write ºÍ Replication-Delete£¬µ«µ±Ê±²âÊÔµÄʱºòºÃÏñÓеãÎÊÌ⣬Òò´Ë£¬Ã»ÓÐʹÓá£ÁíÍ⣬Create²»Óùܣ¬ÒòΪ£¬´¥·¢ÁËCreateÖ®ºóÒ»¶¨»á´¥·¢WriteµÄ)£¬ÔÚµÚÒ»¸öÀ¸Î»ÌîÈëTriggerÒªÖ´ÐеijÌÐò(Ò»°ãÒÔ.t½áβ)£¬½«ºóÃæµÄCRC¼ìÑéÉèÖÃΪno(·ñÔò£¬³ÌÐòÔÚÖ´ÐÐʱ»á±¨´í)£¬ÉèÖÃÍêºóµãF4Í˳ö£¬²¢ÔÚµ¯³öµÄ´°¿ÚÖеã»÷±£´æ£¬ÕâÑù£¬Trigger¾ÍÉèºÃÁË¡£
2. ±àдTrigger´úÂë
ÏÈ¿´ÏÂÃæµÄ´úÂ룺
TRIGGER PROCEDURE FOR WRITE OF PT_MSTR OLD BUFFER OLD_PT_MSTR./*ÐÞ¸ÄÊý¾ÝʱµÄTrigger*/
TRIGGER PROCEDURE FOR DELETE OF PT_MSTR./*ɾ³ýÊý¾ÝʱµÄ
Ïà¹ØÎĵµ£º
Éý¼¶mysqlÊý¾Ý¿âµÄ·½·¨£º
1. ÏÂÔØ°²×°½éÖÊmysql-essential-5.1.46-win32.msi
¿ÉÒÔµ½¹ÙÍøhttp://www.mysql.com/click.php?e=35166»òÆäËûÍøվȥÏÂÔØ£»
2. ±¸·ÝmysqlµÄÊý¾Ý£»
ÔËÐÐcmd´ò¿ªÃüÁîÌáʾ·û£¬½øÈëµ½mysqlÈí¼þµÄ ......
¹«Ë¾µÄ·þÎñÆ÷ÊÇCentOS 5.4(Final)°æµÄ£¬½ñÌìÔÚÉÏÃæ°²×°ÁËÒ»»Ømysql5.5£¬¼Ç¼ÈçÏ£º
1¡¢´Óhttp://blog.s135.com/soft/linux/nginx_php/mysql/mysql-5.5.2-m2.tar.gz ÏÂÔØÔ´Âë°²×°°üµ½/usr/local/src
2¡¢tar zxvf mysql-5.5.2-m2.tar.gz ½âѹµ½/usr/local/src/mysql-5.5.2-m2ÏÂ
cd mysql-5.5.2-m2/
&n ......
24СʱÄڼǼ£¨¼´86400Ã룩
$sql="SELECT video_id,count(id)as n from `rec_down` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(add_time)<=86400 group by video_id order by n desc ";
$sql="select a.id,a.title,b.n from video_info a,(".$sql.")b where a.id=b.video_id order by n desc limit 20";
NÌìÄڼǼ
......
ÒÔϵÄÎÄÕÂÊÇMySQL grantÓï·¨µÄÏêϸ½âÎö£¬Èç¹ûÄã¶ÔMySQL grantÓï·¨µÄÏà¹ØµÄʵ¼Ê²Ù×÷ÓÐÐËȤµÄ»°£¬Äã¾Í¿ÉÒÔ¶ÔÒÔϵÄÎÄÕµã»÷¹Û¿´ÁË¡£ÎÒÃÇ´ó¼Ò¶¼ÖªµÀMySQLÊý¾Ý¿â¸³ÓèÓû§È¨ÏÞÃüÁîµÄ¼òµ¥¸ñʽ¿É¸ÅÀ¨Îª£º
grant ȨÏÞ on Êý¾Ý¿â¶ÔÏó to Óû§
Ò»¡¢grant ÆÕͨÊý¾ÝÓû§£¬²éѯ¡¢²åÈë¡¢¸üС¢É¾³ý Êý¾Ý¿âÖÐËùÓбíÊý¾ÝµÄȨÀû¡£
grant ......
¾¡¿ÉÄܵØʹÓÃ×îÓÐЧ(×îС)µÄÀàÐÍ¡£MySQLÓкܶà½ÚÊ¡´ÅÅÌ¿Õ¼äºÍÄÚ´æµÄרҵ»¯ÀàÐÍ¡£
Èç¹û¿ÉÄÜʹ±í¸üС£¬Ê¹ÓýÏСµÄÕûÊýÀàÐÍ¡£ÀýÈ磬MEDIUMINT¾³£±ÈINTºÃһЩ¡£
Èç¹û¿ÉÄÜ£¬ÉùÃ÷ÁÐΪNOT NULL¡£ËüʹÈκÎÊÂÇé¸ü¿ì¶øÇÒÄãΪÿÁнÚʡһλ¡£×¢ÒâÈç¹ûÔÚÄãµÄÓ¦ÓóÌÐòÖÐÄãȷʵÐèÒªNULL£¬ÄãÓ¦¸ÃºÁÎÞÒÉÎÊʹÓÃËü£¬Ö»ÊDZÜÃâȱʡµØÔÚËùÓ ......