MySQL·À×¢Èë
·ÀÖ¹×¢ÈëµÄ¼¸ÖÖ°ì·¨
ÆäʵÔÀ´¾ÍÊÇÎÒÃÇÐèÒª¹ýÂËһЩÎÒÃdz£¼ûµÄ¹Ø¼ü×ֺͷûºÏÈ磺
Select£¬insert£¬update£¬delete£¬and£¬*£¬µÈµÈ
function inject_check($sql_str) {
return eregi('select|insert|update|delete|\'|\/\*|\*|\.\.\/|\.\/|union|into|load_file
|outfile', $sql_str);
}
»òÕßÊÇͨ¹ýϵͳº¯Êý¼äµÄ¹ýÂËÌØÊâ·ûºÅ
Addslashes£¨ÐèÒª±»¹ýÂ˵ÄÄÚÈÝ£©
Ïà¹ØÎĵµ£º
ÅäÖãº
binlog:ÓÃÓÚÔöÁ¿±¸·Ý
errorlog:¼à¿Ø´íÎóÐÅÏ¢
slow_query_log:¼à¿Ø²éѯ³¬Ê±µÄSQLÓï¾ä
data directory:Ìá¸ßÐÔÄÜ£¬±ãÓÚ¹ÜÀí
Ñ¡ÔñĬÈÏÊý¾Ý¿âÒýÇæ
INNODBÊý¾Ý¿âÒýÇæµÄÊý¾ÝĿ¼:Ìá¸ßÐÔÄÜ£¬±ãÓÚ¹ÜÀí
log_bin_trust_routine_creators=1 Èç¹û¸´ÖÆϵͳÀïÓÐʹÓõ½Óû§×Ô¶¨Ò庯Êý»ò´æ´¢¹ý³Ì ......
ʹÓÃwhileÑ»·Óï¾äÉú³É²âÊÔÊý¾Ý£º
ÏÂÃæµÄ·½·¨ÊÇͨ¹ý´´½¨Ò»¸ö´æ´¢¹ý³Ì£¬È»ºóÔÙµ÷ÓÃÕâ¸ö´æ´¢¹ý³ÌÀ´ÊµÏֵģ¬´ÓÍøÉÏÕÒÁ˺ܶ෽·¨£¬µ«¶¼Ã»Óгɹ¦¡£
delimiter // /*¶¨ÒåÃüÁî½áÊø·ûĬÈÏΪ ; */
create procedure genUsers()
begin
declare i int default 0;
while i < 40 do
insert into users(userID,userName, ......
MysqlÊý¾Ý¿âÊÇÒ»¸ö¶àÓû§£¬¶àÏ̵߳ĹØϵÐÍÊý¾Ý¿â£¬ÊÇÒ»¸ö¿Í»§»ú/·þÎñÆ÷½á¹¹µÄÓ¦ÓóÌÐò¡£ËüÊǶԸöÈËÓû§ºÍÉÌÒµÓû§ÊÇÃâ·ÑµÄ.
¡¡¡¡MysqlÊý¾Ý¿â¾ßÓÐÒÔÏÂÓŵ㣺
¡¡¡¡1.ͬʱ·ÃÎÊÊý¾Ý¿âµÄÓû§µÄÊýÁ¿²»ÊÜÏÞÖÆ
¡¡¡¡2.¿ÉÒÔ±£´æ³¬¹ý5ǧÍòÌõµÄ¼Ç¼
¡¡¡¡3.ÊÇÄ¿Ç°Êг¡ÉÏÏÖÓÐÊý¾Ý¿â²úÆ·ÖÐÔËÐÐËÙ¶È×î¿ìµÄÊý¾Ý¿âϵͳ
¡¡¡¡4.Óû§È¨ÏÞ ......
×î½üµÄÏîÄ¿ÖÐʹÓÃÁËMySQLÊý¾Ý¿â£¬Ò»Ð©MySQLµÄÐÂÓû§ÔÚÅäÖÃʹÓÃʱ»¹ÓÐЩ²»¹»ÊìÁ·£¬ÌØÔڴ˼Ǽ£¬·½±ã¿ª·¢ÍŶÓʹÓ㬸ÃÎÄÕÂËùÉæ¼°ÄÚÈݾù¿ÉÒÔÔÚMySQL²Î¿¼ÊÖ²áµÚ¶þÕ“°²×°MySQL”ÖÐÕÒµ½¡£MySQL°²×°ºó×Ô´øÁËÓ¢ÎIJο¼ÊֲᣬҲ¿ÉÒÔÔÚhttp://dev.mysql.com/doc/refman/5.1/zh/index.html²é¿´ÖÐÎÄ°æ±¾£ ......
MySQL³£ÓõĴ洢ÒýÇæΪMyISAM¡¢InnoDB¡¢MEMORY¡¢MERGE£¬ÆäÖÐInnoDBÌṩÊÂÎñ°²È«±í£¬ÆäËû´æ´¢ÒýÇ涼ÊÇ·ÇÊÂÎñ°²È«±í¡£
MyISAMÊÇMySQLµÄĬÈÏ´æ´¢ÒýÇæ¡£MyISAM²»Ö§³ÖÊÂÎñ¡¢Ò²²»Ö§³ÖÍâ¼ü£¬µ«Æä·ÃÎÊËٶȿ죬¶ÔÊÂÎñÍêÕûÐÔûÓÐÒªÇó¡£
InnoDB´æ´¢ÒýÇæÌṩÁ˾ßÓÐÌá½»¡¢»Ø¹öºÍ±ÀÀ£»Ö¸´ÄÜÁ¦µÄÊÂÎñ°²È«¡£µ«ÊDZÈÆðMyISAM´æ´ ......