תÔØ:¹ØÓÚMYSQLÓï¾ä´æÔÚ×¢È멶´µÄд·¨
תÔØ:¹ØÓÚMYSQLÓï¾ä´æÔÚ×¢È멶´µÄд·¨
±¾ÎÄ×÷Õߣºangel
ÎÄÕÂÐÔÖÊ£ºÔ´´
·¢²¼ÈÕÆÚ£º2004-09-16
±¾ÎÄÒѾ·¢±íÔÚ¡¶ºÚ¿Í·ÀÏß¡·7Ô¿¯£¬×ªÔØÇë×¢Ã÷¡£ÓÉÓÚдÁ˺ܾã¬Ëæ׿¼ÊõµÄ½ø²½£¬±¾ÈËÒ²·¢ÏÖ¸ÃÎÄÀïÓв»ÉÙ´íÎóºÍÂÞàµĵط½¡£Çë¸÷λ¸ßÊÖ¿´Á˲»ÒªÐ¦¡£±¾ÎÄдÓÚ¡¶Advanced SQL Injection with MySQL¡·Ö®Ç°Ò»¸öÔ¡£
ÉùÃ÷
¡¡¡¡±¾ÎĽöÓÃÓÚ½ÌѧĿµÄ£¬Èç¹ûÒòΪ±¾ÎÄÔì³ÉµÄ¹¥»÷ºó¹û±¾È˸Ų»¸ºÔ𣬱¾ÎÄËùÓдúÂë¾ùΪ±¾ÈËËùд£¬ËùÓÐÊý¾Ý¾ù¾¹ý²âÊÔ¡£¾ø¶ÔÕæʵ¡£Èç¹ûÓÐʲôÒÅ©»ò´íÎ󣬻¶ÓÀ´°²È«ÌìʹÂÛ̳£¨http://www.4ngel.net/forums£©ºÍÎÒ½»Á÷¡£
Ç°ÑÔ
¡¡¡¡2003Ä꿪ʼ£¬Ï²»¶½Å±¾¹¥»÷µÄÈËÔ½À´Ô½¶à£¬¶øÇÒÑо¿ASPÏÂ×¢ÈëµÄÅóÓÑÒ²Ö𽥶àÁËÆðÀ´£¬ÎÒ¿´¹ý×îÔçµÄ¹ØÓÚSQL×¢ÈëµÄÎÄÕÂÊÇһƪ99Äê¹úÍâµÄ¸ßÊÖдµÄ£¬¶øÏÖÔÚ¹úÍâµÄÒѾ¯»ð´¿ÇàÁË£¬¹úÄڲſªÊ¼×¢ÒâÕâ¸ö¼¼Êõ£¬ÓÉ´Ë¿´À´£¬¹úÄÚµÄÕâ·½ÃæµÄ¼¼ÊõÏà¶ÔÓÚ¹úÍ⻹ÊÇÓÐÒ»¶ÎºÜ´ó²î¾à£¬»°Ëµ»ØÀ´£¬´ó¼Ò¶ÔSQL×¢Èë¹¥»÷Ò²Ï൱ÊìϤÁË£¬¹úÄÚ¸÷´óÕ¾µã¶¼ÓÐЩ¿°³Æ¾µäµÄ×÷Æ·£¬²»¹ý×÷ΪһƪÍêÕûµÄÎÄÕ£¬ÎÒ¾õµÃ»¹ÊÇÓбØÒªÔÙ˵˵Æ䶨ÒåºÍÔÀí¡£Èç¹ûÄÄλ¸ßÊÖÒѾ´ïµ½Â¯»ð´¿ÇàµÄµØ²½£¬²»·Á¸ø±¾ÎÄÌôµã´Ì¡£È¨µ±Ö¸µãСµÜ¡£
¹ØÓÚphp+MysqlµÄ×¢Èë
¡¡¡¡¹úÄÚÄÜ¿´µ½php+Mysql×¢ÈëµÄÎÄÕ¿ÉÄܱȽÏÉÙ£¬µ«ÊÇÈç¹û¹Ø×¢¸÷ÖÖWEB³ÌÐòµÄ©¶´£¬¾Í¿ÉÒÔ·¢ÏÖ£¬ÆäʵÕâЩ©¶´µÄÎÄÕÂÆäʵ¾ÍÊÇÒ»¸öÀý×Ó¡£²»¹ýÓÉÓÚ¹úÄÚÑо¿PHPµÄÈ˱ÈÑо¿ASPµÄÈËʵÔÚÉÙÌ«¶à£¬ËùÒÔ£¬¿ÉÄÜûÓÐ×¢Ò⣬¿öÇÒPHPµÄ°²È«ÐÔ±ÈASP¸ßºÜ¶à£¬µ¼ÖºܶàÈ˲»Ïë¿çÔ½Õâ¸öÃż÷¡£
¡¡¡¡¾¡¹ÜÈç´Ë£¬ÔÚPHPÕ¾µãÈÕÒæÔö¶àµÄ½ñÌ죬SQL×¢ÈëÈÔÊÇ×îÓÐЧ×îÂé·³µÄÒ»ÖÖ¹¥»÷·½Ê½£¬ÓÐЧÊÇÒòΪÖÁÉÙ70% ÒÔÉϵÄÕ¾µã´æÔÚSQL Injection©¶´£¬°üÀ¨¹úÄڴ󲿷ְ²È«Õ¾µã£¬Âé·³ÊÇÒòΪMYSQL4ÒÔϵİ汾ÊDz»Ö§³Ö×ÓÓï¾äµÄ£¬¶øÇÒµ±php.iniÀïµÄ magic_quotes_gpc ΪOn ʱ¡£Ìá½»µÄ±äÁ¿ÖÐËùÓÐµÄ ' (µ¥ÒýºÅ), " (Ë«ÒýºÅ), \ (·´Ð±Ïß) and ¿Õ×Ö·û»á×Ô¶¯×ªÎªº¬Óз´Ð±ÏßµÄתÒå×Ö·û¡£¸ø×¢Èë´øÀ´²»ÉÙµÄ×è°¡£
¡¡¡¡ÔçÆÚµÄʱºò£¬¸ù¾Ý³ÌÐòµÄ´úÂ룬Ҫ¹¹Ôì³öûÓÐÒýºÅµÄÓï¾äÐγÉÓÐЧµÄ¹¥»÷£¬»¹ÕæµÄÓеãÀ§ÄÑ£¬ºÃÔÚÏÖÔڵļ¼ÊõÒѾ¹¹Ôì³ö²»´øÒýºÅµÄÓï¾äÓ¦ÓÃÔÚijЩ³¡ºÏ¡£Ö»ÒªÓоÑ飬Æäʵ¹¹ÔìÓÐЧµÄÓï¾äÒ»µãÒ²²»ÄÑ£¬ÉõÖÁ³É¹¦ÂÊÒ²ºÜ¸ß£¬µ«¾ßÌåÇé¿ö¾ßÌå·ÖÎö¡£Ê×ÏÈÒª×ß³öÒ»¸öÎóÇø¡£
×¢£ºÔÚûÓоßÌå˵Ã÷µÄÇé¿öÏ£¬ÎÒÃǼÙÉèmagic_quotes_gpc¾ùΪoff¡£
php+Mysql×¢ÈëµÄÎóÇø
¡¡¡¡ºÜ¶àÈËÈÏΪÔÚPHP+MYSQLÏÂ×¢ÈëÒ»¶¨ÒªÓõ½µ¥ÒýºÅ£¬»òÕßÊÇûÓа취ÏñMSSQ
Ïà¹ØÎĵµ£º
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
//===========================================
// ³ÌÐò£º mysql-Based Session Class
// ¹¦ÄÜ£º »ùÓÚmysql´æ´¢µÄ Session ¹¦ÄÜÀà
// ×÷Õß: yejr
// ÍøÕ¾: http://imysql.cn
// ʱ¼ä: 2007- ......
¸ÃÁ¬½Ó·½Ê½²ÉÓÃRPCÀ´·µ»ØÊý¾Ý¿â²éѯ½á¹û¡£
1.Ê×ÏÈÊÇ´´½¨ÆÕͨµÄGWT-EXT¹¤³Ì¡£¿ÉÒԲο¼1http://www.ibm.com/developerworks/cn/java/j-lo-gwtext1/#resources
ϵÁÐ Èë ÃÅ ½Ì³Ì¡£¾ßÌåͨѶ¹ý³Ì·þÎñÒ²¿É²Î¿¼ÉÏÊöµÄ×îºó²¿·Ö˵Ã÷¡£
2. ½ÓÏÂÀ´¾ÍÊÇÒª´´½¨GWT Remote ServiceÁË£¬ÔÚÔÓй¤³ÌÉÏnew-&g ......
ÓеÄÓû§£¬³öÓÚʹÓÃmysqlÊý¾Ý¿â¿ª·¢ÆäËû³ÌÐòµÄÐèÒª£¬¿ÉÄÜÏ£ÍûÐÞ¸ÄMysqlÊý¾Ý¿âµÄrootÓû§ÃÜÂ룬
ÏÖ×öÒÔϼòҪ˵Ã÷¡£
ÓÉÓÚOAʹÓõÄMysqlÊý¾Ý¿â±»É趨ΪֻÄÜ´Ó±¾»ú·ÃÎÊ£¬ËùÒÔÆÕͨÓû§²»½¨ÒéÐÞ¸ÄÊý¾Ý¿âÃÜÂ룬
ÐÞ¸ÄÊý¾Ý¿âÃÜÂë²¢²»ÊÇΪÁ˸ÄÉÆϵͳ°²È«ÐÔµÄÄ¿µÄ¡£
windows-¡µ¿ªÊ¼—¡µÔËÐУ¬ÊäÈëcmd½øÈëÃüÁîÐÐģʽ£¬²¢Ê¹Ó ......
TINYINT 1 ×Ö½Ú
SMALLINT 2 ¸ö×Ö½Ú
MEDIUMINT 3 ¸ö×Ö½Ú
INT 4 ¸ö×Ö½Ú
INTEGER 4 ¸ö×Ö½Ú
BIGINT 8 ¸ö×Ö½Ú
FLOAT(X) 4 Èç¹û X < = 24 »ò 8 Èç¹û 25 < = X < = 53
FLOAT 4 ¸ö×Ö½Ú
DOUBLE 8 ¸ö×Ö½Ú
DOUBLE PRECISION 8 ¸ö×Ö½Ú
REAL 8 ¸ö×Ö½Ú
DECIMAL(M,D) M×Ö½Ú(D+2 , Èç¹ûM < D)
NUMERIC(M,D) M×Ö½Ú(D ......
ÔÎÄת×Ô:http://hi.baidu.com/jackli00/blog/item/21b2e242025bfa1473f05d24.html
Mysql¿ªÆôÈÕÖ¾
2008-11-18 11:23
ÊÇ·ñÆôÓÃÁËÈÕÖ¾
mysql>show variables like 'log_bin';
ÔõÑùÖªµÀµ±Ç°µÄÈÕÖ¾
mysql> show master status;
¿´¶þ½øÖÆÈÕÖ¾ÎļþÓÃmysqlbinlog
shell>mysqlbinlog mail-bin.000001(Ҫд¾ø¶ÔÎÊÌâ ......