Mysql ±¸·ÝÓë»Ö¸´
mysql server4.0.18
Åú´¦ÀíÎļþÃûΪdbBackup.bat
ÄÚÈÝ£ºrem ÅжÏmysql·þÎñÊÇ·ñÆô¶¯£¬È»ºó½«²éѯ½á¹ûÊä³öµ½server.logÎļþÀï
netstat -na | (find "0.0.0.0:3306" & find "LISTENING")>server.log
rem ÊÖ¹¤½¨Á¢Ò»¸ö¿ÕµÄÎļþtemp.log£¬ÎªÁ˺Íserver.logÎļþÏà±È½Ï
rem ½«server.logÓëtemp.logÏà±È½Ï£¬Èç¹ûmysql·þÎñÒѾÆô¶¯£¬ÄÇôserver.logÎļþÖоͻáÓÐÐÅÏ¢¡£·ñÔòΪ¿Õ
fc server.log temp.log
rem Èç¹ûmysql·þÎñÒѾÆô¶¯£¬ÄÇô¾ÍÖ±½ÓÓÃmysqldump½øÐб¸·Ý£»Èç¹ûûÓÐÆô¶¯£¬Ò²¾ÍÊÇserver.logÎļþΪ¿Õ£¬ÄÇô¾Í»áÏÈ
rem Æô¶¯Êý¾Ý¿â£¬È»ºóÔÙ±¸·Ý
if not ERRORLEVEL 0 goto backup
@echo Trying to net start mysql
:backup
mysqldump -uroot mysql >back_%date:~4%.sql
×¢£ºÔÚ“%date:~4%”ÖÐ4±íʾ×îÖÕÏÔʾµÄÈÕÆÚ¸ñʽ
“4”±íʾÄêÔÂÈÕ¶¼ÏÔʾ
“8”±íʾֻÏÔʾÔÂÈÕ
“12”±íʾֻÏÔʾÈÕÆÚ
MysqlµÄ±¸·Ý
ÎÒÃǵÄÊý¾Ý¿âÐèÒª¾³£±¸·Ý£¬MysqlÊý¾Ý¿âµÄ³£Óñ¸·Ý·½·¨ÊÇʹÓÃʹÓÃʵÓóÌÐòmysqldump, ÆäÃüÁî¸ñʽÈçÏ£º
# mysqldump [options] database [tables]
Æä²ÎÊýµÄº¬ÒåΪ£º
options£º´ú±ímysqldumpµÄÑ¡Ïͨ¹ýmysqldump –help¿ÉÒԲ鵽¡£
database: ´ú±í½«Òª±¸·ÝµÄÊý¾Ý¿â
tables: ´ú±í½«Òª±¸·ÝµÄ±í£¬Èç¹û²»Ö¸¶¨ÈÎºÎ±í£¬Ôò±¸·ÝÕû¸öÊý¾Ý¿â¡£
ÀûÓÃϵͳcrontabÀ´¶¨Ê±Ö´Ðб¸·ÝÎļþ£¬°´ÈÕÆÚ¶Ô±¸·Ý½á¹û½øÐб£´æ£¬´ïµ½±¸·ÝµÄÄ¿µÄ¡£
1¡¢´´½¨±£´æ±¸·ÝÎļþµÄ·¾¶/mysqldata
#mkdir /mysqldata
2¡¢´´½¨/usr/sbin/bakmysqlÎļþ
#vi /usr/sbin/bakmysql
ÊäÈë
rq=` date +%Y%m%d `
tar zcvf /mysqldata/mysql$rq.tar.gz /var/lib/mysql
»òÕßд³É
rq=` date +%Y%m%d `
mysqldump --all-databases -u root -p980405 > /mysqldata/mysql$rq.tar.gz
/var/lib/mysqlÊÇÄãÊý¾Ý¿âÎļþµÄĿ¼£¬²¿·ÖÓû§ÊÇ/usr/local/mysql/data£¬Ã¿¸öÈË¿ÉÄܲ»Í¬
/mysqldata/±íʾ±£´æ±¸·ÝÎļþµÄĿ¼£¬Õâ¸öÿ¸öÈËÒ²¿ÉÒÔ¸ù¾Ý×Ô¼ºµÄÒªÇóÀ´×ö¡£
3¡¢ÐÞ¸ÄÎļþÊôÐÔ£¬Ê¹Æä¿ÉÖ´ÐÐ
# chmod +x /usr/sbin/bakmysql
4¡¢ÐÞ¸Ä/etc/crontab
#vi /etc/crontab
ÔÚÏÂÃæÌí¼Ó
01 3 * * * root /usr/sbin/bakmysql
±íʾÿÌì3µãÖÓÖ´Ðб¸·Ý
Ïà¹ØÎĵµ£º
±¾ÎÄÌÖÂÛ MySQL µÄ±¸·ÝºÍ»Ö¸´»úÖÆ£¬ÒÔ¼°ÈçºÎά»¤Êý¾Ý±í£¬°üÀ¨×îÖ÷ÒªµÄÁ½ÖÖ±íÀàÐÍ£ºMyISAM ºÍ Innodb£¬ÎÄÖÐÉè¼ÆµÄ MySQL °æ±¾Îª 5.0.22¡£
Ä¿Ç° MySQL Ö§³ÖµÄÃâ·Ñ±¸·Ý¹¤¾ßÓУºmysqldump¡¢mysqlhotcopy£¬»¹¿ÉÒÔÓà SQL Óï·¨½øÐб¸·Ý£ºBACKUP TABLE »òÕß SELECT INTO OUTFILE£¬ÓÖ»òÕß±¸·Ý¶þ½øÖÆÈÕÖ¾£¨binlog£©£¬»¹¿ÉÒÔÊÇÖ±½Ó¿½± ......
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¹ ......
¡¾51CTO.com¶À¼ÒÌظ塿Ãæ¶Ô¾ª»ÅµÄ¿Í»§ºÍ¹ã·ºÖÊÒɵÄýÌ壬Oracle¹Ù·½×î½üÖÕÓÚ³ö°ñ°²Ãñ£¬ÄDZãÊÇÒ»¸öÒÔ“SUN CUSTOMERS ,Oracle Plans To£º”Ϊ´ó±êÌâµÄ¹ã¸æ¡£Ö±Òë¹ýÀ´±ã¹ýÀ´¿ÉÖªµÀ£¬Oracle½«Òª¼Ó´óSPARCºÍSolarisµÄͶÈëÁË£¬¶ø´óÀÏ°å°£ÀïÉÒ²ÏòIBMÓ²¼þÏÂÁËÕ½Ê飬Éù³ÆOracle½«×îÖÕÓ®µÃÕⳡ¾ºÕù……
&n ......