MySQL ×Ö·û¼¯µ¼ÖÂSQLÁ¬½ÓÖ®ºóÖÐÎÄÂÒÂëµÄÎÊÌ⣡
character-set-server = GB2312
collation-server = latin1_general_ci
MySQL×Ö·û¼¯ GBK¡¢GB2312¡¢UTF8Çø±ð ½â¾ö MYSQLÖÐÎÄÂÒÂëÎÊÌâ ÊÕ²Ø
MySQLÖÐÉæ¼°µÄ¼¸¸ö×Ö·û¼¯
character-set-server/default-character-set£º·þÎñÆ÷×Ö·û¼¯£¬Ä¬ÈÏÇé¿öÏÂËù²ÉÓõġ£
character-set-database£ºÊý¾Ý¿â×Ö·û¼¯¡£
character-set-table£ºÊý¾Ý¿â±í×Ö·û¼¯¡£
ÓÅÏȼ¶ÒÀ´ÎÔö¼Ó¡£ËùÒÔÒ»°ãÇé¿öÏÂÖ»ÐèÒªÉèÖÃcharacter-set-server£¬¶øÔÚ´´½¨Êý¾Ý¿âºÍ±íʱ²»ÌرðÖ¸¶¨×Ö·û¼¯£¬ÕâÑùͳһ²ÉÓÃcharacter-set-server×Ö·û¼¯¡£
character-set-client£º¿Í»§¶ËµÄ×Ö·û¼¯¡£¿Í»§¶ËĬÈÏ×Ö·û¼¯¡£µ±¿Í»§¶ËÏò·þÎñÆ÷·¢ËÍÇëÇóʱ£¬ÇëÇóÒÔ¸Ã×Ö·û¼¯½øÐбàÂë¡£
character-set-results£º½á¹û×Ö·û¼¯¡£·þÎñÆ÷Ïò¿Í»§¶Ë·µ»Ø½á¹û»òÕßÐÅϢʱ£¬½á¹ûÒÔ¸Ã×Ö·û¼¯½øÐбàÂë¡£
ÔÚ¿Í»§¶Ë£¬Èç¹ûûÓж¨Òåcharacter-set-results£¬Ôò²ÉÓÃcharacter-set-client×Ö·û¼¯×÷ΪĬÈϵÄ×Ö·û¼¯¡£ËùÒÔÖ»ÐèÒªÉèÖÃcharacter-set-client×Ö·û¼¯¡£
Òª´¦ÀíÖÐÎÄ£¬Ôò¿ÉÒÔ½«character-set-serverºÍcharacter-set-client¾ùÉèÖÃΪGB2312£¬Èç¹ûҪͬʱ´¦Àí¶à¹úÓïÑÔ£¬ÔòÉèÖÃΪUTF8¡£
¹ØÓÚMySQLµÄÖÐÎÄÎÊÌâ
½â¾öÂÒÂëµÄ·½·¨ÊÇ£¬ÔÚÖ´ÐÐSQLÓï¾ä֮ǰ£¬½«MySQLÒÔÏÂÈý¸öϵͳ²ÎÊýÉèÖÃΪÓë·þÎñÆ÷×Ö·û¼¯character-set-serverÏàͬµÄ×Ö·û¼¯¡£
character_set_client£º¿Í»§¶ËµÄ×Ö·û¼¯¡£
character_set_results£º½á¹û×Ö·û¼¯¡£
character_set_connection£ºÁ¬½Ó×Ö·û¼¯¡£
ÉèÖÃÕâÈý¸öϵͳ²ÎÊýͨ¹ýÏòMySQL·¢ËÍÓï¾ä£ºset names gb2312
¹ØÓÚGBK¡¢GB2312¡¢UTF8
UTF-8£ºUnicode Transformation Format-8bit£¬ÔÊÐíº¬BOM£¬µ«Í¨³£²»º¬BOM¡£ÊÇÓÃÒÔ½â¾ö¹ú¼ÊÉÏ×Ö·ûµÄÒ»ÖÖ¶à×Ö½Ú±àÂ룬Ëü¶ÔÓ¢ÎÄʹÓÃ8루¼´Ò»¸ö×Ö½Ú£©£¬ÖÐÎÄʹÓÃ24Ϊ£¨Èý¸ö×Ö½Ú£©À´±àÂë¡£UTF-8°üº¬È«ÊÀ½çËùÓйú¼ÒÐèÒªÓõ½µÄ×Ö·û£¬Êǹú¼Ê±àÂ룬ͨÓÃÐÔÇ¿¡£UTF-8±àÂëµÄÎÄ×Ö¿ÉÒÔÔÚ¸÷¹úÖ§³ÖUTF8×Ö·û¼¯µÄä¯ÀÀÆ÷ÉÏÏÔʾ¡£È磬Èç¹ûÊÇUTF8±àÂ룬ÔòÔÚÍâ¹úÈ˵ÄÓ¢ÎÄIEÉÏÒ²ÄÜÏÔʾÖÐÎÄ£¬ËûÃÇÎÞÐèÏÂÔØIEµÄÖÐÎÄÓïÑÔÖ§³Ö°ü¡£
GBKÊǹú¼Ò±ê×¼GB2312»ù´¡ÉÏÀ©Èݺó¼æÈÝGB2312µÄ±ê×¼¡£GBKµÄÎÄ×Ö±àÂëÊÇÓÃË«×Ö½ÚÀ´±íʾµÄ£¬¼´²»ÂÛÖС¢Ó¢ÎÄ×Ö·û¾ùʹÓÃË«×Ö½ÚÀ´±íʾ£¬ÎªÁËÇø·ÖÖÐÎÄ£¬½«Æä×î¸ßλ¶¼É趨³É1¡£GBK°üº¬È«²¿ÖÐÎÄ×Ö·û£¬Êǹú¼Ò±àÂ룬ͨÓÃÐÔ±ÈUTF8²î£¬²»¹ýUTF8Õ¼ÓõÄÊý¾Ý¿â±ÈGBD´ó¡£
GBK¡¢GB2312µÈÓëUTF8Ö®¼ä¶¼±ØÐëͨ¹ýUnicode±àÂë²ÅÄÜÏ໥ת»»£º
GBK¡¢GB2312££Unicode££UTF8
UTF8££Unicode££GBK¡¢GB2312
¶ÔÓÚÒ»¸öÍøÕ¾
Ïà¹ØÎĵµ£º
¹Ø¼ü×Ö: mysql
MySQL ÂÒÂëµÄ¸ùÔ´ÊÇµÄ MySQL ×Ö·û¼¯ÉèÖò»µ±µÄÎÊÌ⣬±¾ÎÄ»ã×ÜÁËÓйز鿴 MySQL ×Ö·û¼¯µÄÃüÁî¡£°üÀ¨²é¿´ MySQL Êý¾Ý¿â·þÎñÆ÷×Ö·û¼¯¡¢²é¿´ MySQL Êý¾Ý¿â×Ö·û¼¯£¬ÒÔ¼°Êý¾Ý±íºÍ×ֶεÄ×Ö·û¼¯¡¢µ±Ç°°²×°µÄ MySQL ËùÖ§³ÖµÄ×Ö·û¼¯µÈ¡£
Ò»¡¢²é¿´ MySQL Êý¾Ý¿â·þÎñÆ÷ºÍÊý¾Ý¿â×Ö·û¼¯¡£
mysql> show variab ......
¿ÉÒÔ½«Õâ¸ö½Å±¾·Å½øcrontab£¬ËûµÄÅäÖÆÎļþÔÚ /etc/crontabÖÐÿÌìÁ賿ִÐÐÒ»´Î£¬×Ô¶¯±¸·Ý Õâ¸ö½Å±¾Ã¿Ìì×î¶àÖ»Ö´ÐÐÒ»´Î£¬¶øÇÒÖ»±£Áô×î½üÎåÌìµÄ±¸·ÝÔÚ·þÎñÆ÷ÉÏ¡£
#!/bin/bash
#This is a ShellScript For Auto DB Backup
#Powered by aspbiz
#2004-09
#Setting
#ÉèÖÃÊý¾Ý¿âÃû£¬Êý¾Ý¿âµÇ¼Ãû£¬ÃÜÂ룬±¸·Ý·¾¶£¬ÈÕ־ ......
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Óï¾äºÜ¼òµ¥£¬ÕâÀïÖ÷Ҫ̸̸һЩÈÝÒ×ÒÅÍüµÄ¡£
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 ta ......