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

MysqlµÄÓα꾿¾¹ÔõôÓÖӳÈպɻ¨±ðÑùºì


MysqlµÄÓα꾿¾¹ÔõôÓÖӳÈպɻ¨±ðÑùºì
Mysql´Ó5.0¿ªÊ¼Ö§³Ö´æ´¢¹ý³ÌºÍtrigger£¬¸øÎÒÃÇϲ»¶ÓÃmysqlµÄÅóÓÑÃǸüϲ»¶mysqlµÄÀíÓÉÁË£¬Óï·¨
ÉϺÍPL/SQLÓвî±ð£¬²»¹ý¸ã¹ý±à³ÌµÄÈ˶¼ÖªµÀ£¬Óï·¨²»ÊÇÎÊÌ⣬¹Ø¼üÊÇ˼Ï룬´óÖÂÁ˽âÓï·¨ºó£¬¾Í´Ó
±äÁ¿¶¨Ò壬ѭ»·£¬Åжϣ¬Óα꣬Òì³£´¦ÀíÕâ¸ö¼¸¸ö·½ÃæÏêϸѧϰÁË¡£¹ØÓÚÓαêµÄÓ÷¨MysqlÏÖÔÚÌṩ
µÄ»¹ºÜÌرð£¬ËäȻʹÓÃÆðÀ´Ã»ÓÐPL/SQLÄÇô˳ÊÖ£¬²»¹ýʹÓÃÉÏ´óÖÂÉÏ»¹ÊÇÒ»Ñù£¬
¶¨ÒåÓαê
declare fetchSeqCursor cursor for select seqname, value from sys_sequence;
ʹÓÃÓαê
open fetchSeqCursor£»
fetchÊý¾Ý
fetch cursor into _seqname, _value;
¹Ø±ÕÓαê
close fetchSeqCursor;
²»¹ýÕⶼÊÇÕë¶ÔcursorµÄ²Ù×÷¶øÒÑ£¬ºÍPL/SQLûÓÐʲôÇø±ð°É£¬²»¹ý¹âÊÇÁ˽⵽Õâ¸öÊǸù±¾²»×ãÒÔ
д³öMysqlµÄfetch¹ý³ÌµÄ£¬»¹ÒªÁ˽âÆäËûµÄ¸üÉîÈëµÄ֪ʶ£¬ÎÒÃDzÅÄÜÕæÕýµÄд³öºÃµÄÓαêʹÓõÄproc
edure
Ê×ÏÈfetchÀë²»¿ªÑ­»·Óï¾ä£¬ÄÇôÏÈÁ˽âÒ»ÏÂÑ­»·°É¡£
ÎÒÒ»°ãʹÓÃLoopºÍwhile¾õµÃ±È½ÏÇå³þ£¬¶øÇÒ´úÂë¼òµ¥¡£
ÕâÀïʹÓÃLoopΪÀý
fetchSeqLoop:Loop
fetch cursor into _seqname, _value;
end Loop;
ÏÖÔÚÊÇËÀÑ­»·£¬»¹Ã»ÓÐÍ˳öµÄÌõ¼þ£¬ÄÇôÔÚÕâÀïºÍoracleÓÐÇø±ð£¬OracleµÄPL/SQLµÄÖ¸ÕëÓиöÒþÐÔ±ä
Á¿%notfound£¬MysqlÊÇͨ¹ýÒ»¸öError handlerµÄÉùÃ÷À´½øÐÐÅжϵģ¬
declare continue handler for Not found (do some action);
ÔÚMysqlÀïµ±Óαê±éÀúÒç³öʱ£¬»á³öÏÖÒ»¸öÔ¤¶¨ÒåµÄNOT FOUNDµÄError£¬ÎÒÃÇ´¦ÀíÕâ¸öError²¢¶¨ÒåÒ»
¸öcontinueµÄhandler¾Í¿ÉÒÔß·£¬¹ØÓÚMysql Error handler¿ÉÒÔ²éѯMysqlÊÖ²á
¶¨ÒåÒ»¸öflag£¬ÔÚNOT FOUND£¬±êʾFlag,ÔÚLoopÀïÒÔÕâ¸öflagΪ½áÊøÑ­»·µÄÅжϾͿÉÒÔß·¡£
declare fetchSeqOk boolean; ## define the flag for loop judgement
declare _seqname varchar(50); ## define the varient for store the data
declare _value bigint(20);
declare fetchSeqCursor cursor for select seqname, value from sys_sequence;## define the cursor
declare continue handler for NOT FOUND set fetchSeqOk = true; ## define the continue handler for not
found flag
set fetchSeqOk = false;
open fetchSeqCursor;
fetchSeqLoop:Loop
if fetchSeqOk then
leave fetchSeqLoop;
else
fetch cursor into _seqname, _value;
select _seqname, _value;
end if;
end Loop;
close fetchSeqCur


Ïà¹ØÎĵµ£º

²é¿´ MySql ×Ö·û¼¯

¹Ø¼ü×Ö: mysql


MySQL ÂÒÂëµÄ¸ùÔ´ÊÇµÄ MySQL ×Ö·û¼¯ÉèÖò»µ±µÄÎÊÌ⣬±¾ÎÄ»ã×ÜÁËÓйز鿴 MySQL ×Ö·û¼¯µÄÃüÁî¡£°üÀ¨²é¿´ MySQL Êý¾Ý¿â·þÎñÆ÷×Ö·û¼¯¡¢²é¿´ MySQL Êý¾Ý¿â×Ö·û¼¯£¬ÒÔ¼°Êý¾Ý±íºÍ×ֶεÄ×Ö·û¼¯¡¢µ±Ç°°²×°µÄ MySQL ËùÖ§³ÖµÄ×Ö·û¼¯µÈ¡£
Ò»¡¢²é¿´ MySQL Êý¾Ý¿â·þÎñÆ÷ºÍÊý¾Ý¿â×Ö·û¼¯¡£
mysql> show variab ......

´´½¨mysqlʵÀý

1. ÔÚ/etc/my.cnfÖмÓÈëÒ»ÏÂÄÚÈÝ [mysqld_dev]
socket=/tmp/mysql.sock
port=3307
pid-file=/var/run/mysqld/mysqld_dev.pid
datadir=/var/lib/mysql_dev
log=/var/log/mysqld_dev.log
log-error=/var/log/mysqld_dev.err.log
user=mysql 2. ¸ù¾ÝÒÔÉÏÄÚÈÝ´´½¨Ä¿Â¼ºÍÎļþ mkdir /var/lib/mysqld_dev chown mys ......

[Injection]¶ÔMYSQL 5.0·þÎñÆ÷ÒÔÉÏ°æ±¾×¢Èë


by ZaraByte
How to do a SQL Injection for MYSQL Server 5.0+
1. Find a vulnerable add a ‘ at the end of the site example: news.php?id=1 add a ‘ at the end of the 1 and see if you get a syntax error
2. order by #–
Keep upping the # until you get an error.
3. union all select 1 ......

FC7ÏÂmysql°²×°ÓëÆô¶¯

Ò»:°²×°
    ÎÞÂÛÄãϲ»¶µÄÊÇÄÄÖÖLINUXÌ×¼þ£¬Ëü¶¼ÓпÉÄÜ´øÓÐMySQL¡£Slackware,Ret Hat,SusEºÍDebianÖж¼ÔÚËüÃǵĵ±Ç°°æ±¾Öаüº¬ÁËËü£¬Õ⽫ÌṩһÖÖ×î¼òµ¥µÄ·½Ê½À´¿ìËÙ°²×°ºÍÔËÐÐMySQL¡£Èç¹ûÄãµÄ·¢Ðа汾ÖÐûÓÐÌṩMySQLÈí¼þ°ü£¬»òÕßÄãÏëµÃµ½×îеİ汾£¬Äã¿ÉÒÔ´ÓMySQLµÄÍøÕ¾:www.mysql.comÉÏÏÂÔضþ½øÖÆ°ü»òÔ ......

MySQL´æ´¢¹ý³ÌʵÀý

9.3  MySQL´æ´¢¹ý³Ì
MySQL 5.0ÒÔºóµÄ°æ±¾¿ªÊ¼Ö§³Ö´æ´¢¹ý³Ì£¬´æ´¢¹ý³Ì¾ßÓÐÒ»ÖÂÐÔ¡¢¸ßЧÐÔ¡¢°²È«ÐÔºÍÌåϵ½á¹¹µÈÌص㣬±¾½Ú½«Í¨¹ý¾ßÌåµÄʵÀý½²½âPHPÊÇÈçºÎ²Ù×ÝMySQL´æ´¢¹ý³ÌµÄ¡£
ʵÀý261£º´æ´¢¹ý³ÌµÄ´´½¨
ÕâÊÇÒ»¸ö´´½¨´æ´¢¹ý³ÌµÄʵÀý
¼ÏñλÖ㺹âÅÌ\mingrisoft\09\261
ʵÀý˵Ã÷
ΪÁ˱£Ö¤Êý¾ÝµÄÍêÕûÐÔ¡¢Ò»ÖÂÐÔ£¬Ìá ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ