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

MySQLѧϰ

»ù±¾µÄMySQLÓï¾äºÜ¼òµ¥£¬ÕâÀïÖ÷Ҫ̸̸һЩÈÝÒ×ÒÅÍüµÄ¡£
1.ÈçºÎÉèÖÃ×ֶεÝÔö
create table tb_User(Id int auto_increment
not null primary key,UserName varchar(50),Password varchar(20));
2.²é¿´±í½á¹¹
desc tb_User;
3.ÈçºÎÐ޸ıí½á
ÖØÃüÃû±í£ºalter table tb_User rename
tb_UserInfo;
Ìí¼ÓÒ»ÁУºalter table tb_User add
(Date datetime);
ɾ³ýÒ»ÁУºalter table tb_User drop
column Date;
ÐÞ¸ÄÒ»ÁÐÊôÐÔ£ºalter table tb_User change
UserName UserName varchar(50) not null;£¨Óô˷½·¨¿ÉÒÔÖØÃüÃûÒ»ÁУ©
Ìí¼ÓÖ÷¼ü£ºalter table tb_User add primary key(Ö÷¼ü×Ö¶Î);
Ìí¼ÓË÷Òý£ºalter table tb-User add index(×Ö¶ÎÃû);
4.ÈçºÎ±¸·ÝºÍµ¼ÈëÊý¾Ý¿â
Õâ¸öÎÊÌâÓм¸ÖÖ·½·¨£¬µ«ÊÇÎÒ¸öÈ˸üϲ»¶mysqldump£¬¾Ù¸öÀý×ÓÎÒÏÖÔÚÓÐÒ»¸öÊý¾Ý¿âdb_cmj
ÏÖÔÚÒªÏ뽫Õâ¸öÊý¾Ý¿â¸½¼Óµ½Áíһ̨µçÄÔÉÏ£¬Èç¹ûÁ½Ì¨µçÄÔÍøÂçͨµÄ»°¿ÉÒÔͨ¹ýmysqldumpÃüÁîÖ±½ÓÒ»²¿Íê³É£¬µ«ÊÇÕâÖÖÇé¿öҪעÒâmysql°æ±¾ÎÊÌâ¡£ÎÒÕâÀïÌṩһÖÖͨÓõķ½·¨£¬Ò²ÊǸüÈÝÒ×Àí½âµÄ£ºÊÔÏëÒ»ÏÂÈç¹ûÄãÄܹ»½«ÏÖÔÚÎÒÕą̂µçÄÔÉϵÄdb_cmjÖÐËùÓеÄÐÅÏ¢¶¼±ä³ÉsqlÓï¾ä£¬²¢±£´æµ½Ò»¸öÎļþÖУ¬È»ºóÄÃ×ÅÕâ¸öÎļþµ½Áíһ̨»úÆ÷ÉÏÖ´ÐÐÒÔϲ»¾Í¿ÉÒÔÁËÂð¡£
¾ßÌåÔõô×öÄØ£¿
ÃüÁîÐÐÖÐÊäÈ룺mysqldump -uroot -p db_cmj > db_cmj.sql [»Ø³µ]
ÊäÈëÃÜÂë
¾Í»áÉú³ÉÒ»¸ödb_cmj.sqlÎļþ£¬ÀïÃæ°üº¬ËùÓÐÄãµÄÊý¾Ý¿âÐÅÏ¢£¬Õâ¸öÎļþºÃÏñÔÚC:\Documents and Settings\AdministratorÏÂ
È»ºóÄõ½Õâ¸öÎļþµ½Áíһ̨»úÆ÷ÉÏ£¬ÀýÈç·Åµ½ÄÇ̨»úÆ÷µÄcÅ̸ùĿ¼£¬´ÓÃüÁîÐнøÈëmysqlºóÖ´ÐÐdb_cmj.sqlÖÐsqlÓï¾ä£¬ÕâÀïÎÒÃÇÓÃÅú´¦Àí
Ö´ÐУºsource C:\db_cmj.sql[»Ø³µ]
¾Í»á·¢ÏÖÄãÒѾ­³É¹¦½«Êý¾Ý¿â¿½±´µ½Õą̂»úÆ÷ÉÏÁË£¬¼È·½±ãÓÖÖ±¹Û£¬×îÖ÷ÒªÊÇ¿ÉÒԵõ½sqlÓï¾ä£¬Õâ²ÅÊDZ¾ÖÊ¡£
×¢Ò⣺Õâ¸ö¹ý³Ì×î³£¼ûµÄÒ»¸öÎÊÌâ¾ÍÊÇ£¬±àÂë²»ÕýÈ·£¬ÎÒÃÇÏëÏóµÄÊǿ϶¨ÓõÄÊÇĬÈϱàÂëutf-8,ËùÒÔÔÚÓÃmysqldumpʱ¾Í²»ÓÃÖ¸¶¨±àÂ뷽ʽ£¬¶øÊÂʵÉÏÎÒÃÇÒªÖ¸¶¨£¬¶øÇÒÒªÖƶ¨³Élatin1£¬Ò²¾ÍÊÇÃüÁî¸ÄΪ£ºmysqldump -uroot -p db_cmj > db_cmj.sql --default-character-set=latin1¡£Õâ¸öÎÊÌâÍøÉÏÓкܶ࣬µ«ÊÇ´ó¶àÊýûÓиø³öºÜºÃµÄ½âÊÍ¡£
³£¼ûÎÊÌ⣺
1.ÈçºÎ²åÈ뵱ǰÈÕÆÚ
insert into tb_User(UserName ,Password,Date) vlaues('cmj','123',Now());
2.×Ö¶ÎΨһÐÔ
×Ö¶ÎΨһÐÔÓõÄÊÇunique¡£
ÍØÕ¹£º
1.ÈçºÎÀûÓÃMySQLʵÏÖ·ÖÒ³
(¼ÙÉèÒ³ÓÐÎåÌõ¼Ç¼£¬ÏÖÔÚÏÔʾ


Ïà¹ØÎĵµ£º

MySQL ±¸·ÝºÍ»Ö¸´

±¾ÎÄÌÖÂÛ MySQL µÄ±¸·ÝºÍ»Ö¸´»úÖÆ£¬ÒÔ¼°ÈçºÎά»¤Êý¾Ý±í£¬°üÀ¨×îÖ÷ÒªµÄÁ½ÖÖ±íÀàÐÍ£ºMyISAM ºÍ Innodb£¬ÎÄÖÐÉè¼ÆµÄ MySQL °æ±¾Îª 5.0.22¡£
Ä¿Ç° MySQL Ö§³ÖµÄÃâ·Ñ±¸·Ý¹¤¾ßÓУºmysqldump¡¢mysqlhotcopy£¬»¹¿ÉÒÔÓà SQL Óï·¨½øÐб¸·Ý£ºBACKUP TABLE »òÕß SELECT INTO OUTFILE£¬ÓÖ»òÕß±¸·Ý¶þ½øÖÆÈÕÖ¾£¨binlog£©£¬»¹¿ÉÒÔÊÇÖ±½Ó¿½± ......

[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 ......

MySQLÊý¾Ý¿âÒýÇæ¿ìËÙÖ¸µ¼

 Èç¹ûÄãÊǸöÈü³µÊÖ²¢ÇÒ°´Ò»Ï°´Å¥¾ÍÄܹ»Á¢¼´¸ü»»ÒýÇæ¶ø²»ÐèÒª°Ñ³µ¿ªµ½³µ¿âÀïÈ¥»»£¬ÄÇ»áÊÇÔõô¸Ð¾õÄØ£¿MySQLÊý¾Ý¿âΪ¿ª·¢ÈËÔ±Ëù×öµÄ¾ÍºÃÏñÊÇ°´°´Å¥»»ÒýÇ棻ËüÈÃÄãÑ¡ÔñÊý¾Ý¿âÒýÇ棬²¢¸øÄãÒ»Ìõ¼òµ¥µÄ;¾¶À´Çл»Ëü¡£
MySQL µÄ×Ô´øÒýÇæ¿Ï¶¨Êǹ»ÓÃÁË£¬µ«ÊÇÔÚÓÐЩÇé¿öÏ£¬ÆäËûµÄÒýÇæ¿ÉÄÜÒª±ÈÊÖÍ·ËùÓøüÊʺÏÍê³ÉÈÎÎñ¡£Èç¹ûÔ¸Ò ......

¼Ç¼µã¶«Î÷£¬MSSQL£¬MySQL£¬.NETµÄMD5¼ÓÃÜ

 MSSQL:select Right(sys.fn_VarBinToHexStr(hashbytes('MD5', '123456')),32)
 MSSQL16λ:select Right(sys.fn_VarBinToHexStr(hashbytes('MD5', '123456')),16)
 MySQL:select md5('123456')
 .NET:string ½á¹û×Ö·û´®=System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFil ......

¸ü¸ÄMySqlÊý¾Ý¿âµÄĬÈϱàÂë¸ñʽ

Ò»¡¢ÉèÖÃÊý¾Ý¿â±àÂë
°²×°mysqlʱ¿ÉÑ¡Ôñ±àÂ룬Èç¹ûÒѾ­°²×°¹ý£¬¿ÉÒÔ¸ü¸ÄÎļþmy.ini(´ËÎļþÔÚmysqlµÄ°²×°Ä¿Â¼ÏÂ)ÖеÄÅäÖÆÒԴﵽĿµÄ£»´ò¿ªÎļþÕÒµ½Á½´¦£º
[client]
port=3306
[mysql]
default-character-set=gb2312
# The default character set that will be used when a new
schema or table is
# created and
n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ