MysqlÖÐÎÄÂÒÂëÎÊÌâÖ®·ÖÎö
MysqlÖÐÎÄÂÒÂëÎÊÌâ
֮ǰ±»mysqlÖÐ×ÜÊdzöÏÖÖÐÎÄÂÒÂë¸ãµÃÔÆÀïÎíÀÔÚÍøÉÏÒ²ËÑÁËЩÏà¹Ø×ÊÁÏ£¬¿É½á¹û¸üÈÃÎÒ¾õµÃ×Ö·û¼¯µÄת»»ÊÇÏ൱¸´ÔÓ£¬ÉõÖÁÓÐÁ˵ִ¥ÐÄÀí£¬²»¹ý»¹ºÃÔÚ×îºóËѵ½¼¸Æª¾µäµÄÎÄÕ£¬¾¹ýÑжÁ×ÜËãÃ÷°×¹ýÀ´£¡ºÃÎÄÕ£¬²»¸Ò¶ÀÏí£¬ÏÖ½«ÎÄÕÂÉÔ×÷ÕûÀíÓë´ó¼Ò·ÖÏí¡£
×Ö·û¼¯»ù±¾¸ÅÄ
http://home.phpchina.com/space.php?uid=57965&do=blog&id=181970
mysqlÖÐÎÄÂÒÂëÔÒòÆÊÎö£º
¶Ô±à³ÌÓÐÓ°ÏìµÄÖ÷ÒªÊÇ¿Í»§¶Ë×Ö·û¼¯ºÍÊý¾Ý¿â×Ö·û¼¯£¬Êý¾Ý¿âÖг£ÓõIJÙ×÷¾ÍÊDZ£´æÊý¾ÝºÍ¶ÁÈ¡Êý¾Ý£¬ÔÚÕâ¸ö¹ý³ÌÖУ¬ÂÒ²»ÂÒÂëºÍÊý¾Ý¿â×Ö·û¼¯Ã²ËÆûÓÐʲô¹Øϵ¡£ÎÒÃÇÖ»Òª±£Ö¤Ð´ÈëʱѡÔñµÄ×Ö·û¼¯ºÍ¶ÁȡʱµÄÑ¡ÔñµÄ×Ö·û¼¯Ò»Ö£¬¼´Ö»Ðè±£Ö¤Á½´Î²Ù×÷µÄ¿Í»§¶Ë×Ö·û¼¯Ò»Ö¼´¿É¡£ÔÚMySQLµÄ¿Í»§¶ËÉÏÖ´ÐÐÒ»´Î²éѯ¹ý³ÌÒ»°ãÊÇ£¬ÔÚ¿Í»§¶ËµÄÌáʾ·ûºóÃæÊäÈëÒ»ÌõSQLÓï¾ä£¬»Ø³µ£¬È»ºóÖÕ¶ËÏÔʾ³ö²éѯµÄ½á¹û¡£Õâ¸ö¹ý³ÌÖУ¬Ö»ÓÐÖն˺ÍÈý¸öMySQLµÄϵͳ±äÁ¿Ö¸¶¨ÁËÕýÈ·µÄ×Ö·û¼¯£¬²ÅÄܱ£Ö¤ÎÒÃǽ«Ò»¸öÕýÈ·µÄSQLÓï¾äË͵½·þÎñÆ÷£¬È»ºó·þÎñÆ÷·µ»ØÕýÈ·µÄ½á¹û£¬²¢ÇÒÔÚÖÕ¶ËÕýÈ·ÏÔʾ¡£Èý¸öMySQLµÄϵͳ±äÁ¿ÊÇ£º
1. character_set_client£¬ÖÕ¶Ë×Ö·û¼¯£¬¸æËßServer¿Í»§¶ËÌá½»µÄSQLÓï¾äµÄ±àÂë¸ñʽ
2. character_set_connection£¬Á¬½Ó×Ö·û¼¯£¬ÊÇ·þÎñÆ÷·ÒëSQLÓï¾äʱÓõ½µÄ±àÂë¸ñʽ
3. character_set_results£¬·µ»ØµÄ½á¹û¼¯µÄ×Ö·û¼¯£¬ÊÇ·þÎñÆ÷·µ»Ø½á¹û¼¯Ö®Ç°°Ñ½á¹û¼¯×ª»»³ÉµÄ±àÂë¸ñʽ ¡£
ÔÚMySQLÖÕ¶Ëͨ¹ýÖ´ÐÐÃüÁî show variables like ‘char%’ ¿ÉÒԲ鿴Õ⼸¸ö±äÁ¿µÄÖµ¡£ÕâÈý¸ö±äÁ¿Í¨³£¶¼É趨ΪͬһÖÖ×Ö·û¼¯£¬ÓÃÃüÁîset names [charset name]¾Í¿ÉÒÔÐÞ¸ÄÕâÈý¸ö±äÁ¿µÄÖµ¡£Ò»°ãÀ´Ëµ£¬Ö»ÒªÄãÉ趨ÁËÄܹ»±íʾÄãµÄÊý¾ÝµÄ×Ö·û¼¯£¬Äã²éѯµÄ½á¹û¶¼¿ÉÒÔÔÚÖÕ¶ËÕýÈ·ÏÔʾ¡£
¾Ù¸öÀý×Ó£ºÊ¹Óõıít1ÊÇutf8±àÂ룬±íÖеÄ×Ö¶Îc1¼Ì³ÐÁËÕâ¸ö±àÂ룬±í´´½¨ÈçÏÂ
mysql> create table t1 ( c1 text not null ) character set utf8;
ÓõÄ×Ö·ûÊǺº×Ö“·¶”£¬gbk±àÂëΪB7 B6£¬utf8±àÂëΪE8 8C 83
ÓÃÏÂÃæµÄSQLÓï¾ä²åÈëÊý¾Ý
mysql> insert into t1 values( ‘·¶’);
a£©Èç¹ûÖÕ¶ËÉèÖÃΪutf8£¬²¢ÇÒÖ´ÐÐÁË set names utf8£¬ÄÇô²åÈëµ½Êý¾Ý¿âÖеľÍÊÇ“·¶”Õâ¸ö×ÖµÄutf8±àÂ룬Õâ¸ö¹ý³ÌÖÐMySQL²»ÐèÒª×ö±àÂëת»»¡£Ð´ÈëÊý¾Ý¿âµÄÄÚÈÝ¿ÉÒÔͨ¹ýÖ´ÐÐ select hex( c1 ) from t1 µÃµ½Êý¾ÝµÄÊ®Áù½øÖƱàÂëÀ´ÑéÖ¤¡£
b£©Èç¹ûÖÕ¶ËÉèÖÃΪ utf8£¬²¢ÇÒÖ´ÐÐÁËset names g
Ïà¹ØÎĵµ£º
½ñÌìµÄѧϰÄÚÈÝÊÇsqliteºÍPDO mysql¡£
ÓÃ×Ô¼ºµÄ»°ËµËµÁ½¸ö¶«Î÷°É£º
sqliteËãÊÇÒ»ÖÖ²»ÏµÍ³µÄÊý¾Ý¿â´æ´¢·½Ê½£¬ËüµÄ´æ·Å¸ñʽÊÇÒ»¸ö.dbºó׺µÄÎļþ£¬ÔÚphpÖÐËü´æ·ÅÔÚµ±Ç°µÄĿ¼Ï£¬Ã²ËƲ»ÓÃÓû§ÃûÃÜÂ룬°²È«ÐԽϵͣ¬È´±È½Ï·½±ã¡£PHP5ÖÐ×Ô´øµÄһЩϵͳº¯Êý£¬¶¼ÊÇÒÔsqlite_¿ªÍ·µÄ¡£
PDOÈ«³ÆPHP Data Object£¬¹ËÃû˼Òå¾ÍÊÇPHPµÄÒ ......
1 MySQLÖ§³Öenum,ºÍsetÀàÐÍ£¬SQL Server²»Ö§³Ö
¡¡¡¡2 MySQL²»Ö§³Önchar,nvarchar,ntextÀàÐÍ
¡¡¡¡3 MySQLµÄµÝÔöÓï¾äÊÇAUTO_INCREMENT£¬¶øMS SQLÊÇidentity(1,1)
¡¡¡¡4 MS SQLĬÈϵ½´¦±í´´½¨Óï¾äµÄĬÈÏÖµ±íʾÊÇ((0)),¶øÔÚMySQLÀïÃæÊDz»ÔÊÐí´øÁ½À¨ºÅµÄ
¡¡¡¡5 MySQLÐèҪΪ±íÖ¸¶¨´æ´¢ÀàÐÍ
¡¡¡¡6 MS SQLʶ±ð·ûÊÇ[],[type]±íÊ ......
PHP ´æÈ¡ MySQL ÂÒÂëÎÊÌâ
ÉÏһƪ / ÏÂһƪ 2007-06-04 03:33:50 / ¸öÈË·ÖÀࣺPHPѧϰ
²é¿´( 239 ) / ÆÀÂÛ( 0 ) / ÆÀ·Ö( 0 / 0 )
MySQL µÄ×Ö·û¼¯Ö§³Ö(Character Set Support)ÓÐÁ½¸ö·½Ã棺×Ö·û¼¯(Character set)ºÍÅÅÐò·½Ê½(Collation)¡£¶ÔÓÚ×Ö·û¼¯µÄÖ§³Öϸ»¯µ½Ëĸö²ã´Î: ·þÎñÆ÷(server)£¬Êý¾Ý¿â(database)£¬Êý¾Ý±í ......
Õâʱ¼äÔÚ°²×°PHPBBµÄÂÛ̳£¬·¢ÏÖÒ»¸öÎÊÌ⣬ÄǾÍÊÇÊäÈëÓû§Ãû¸úÃÜÂëºó£¬µã»÷°²×°£¬×ÜÊDZ¨ÁËÒÔϵĴíÎó£º
³ÌÐò´úÂë
ORA-28008: invalid old password
Cause: old password supplied is wrong; Hence user cannot be authenticated using old password
Action: Supply the correct old password for authenticatio ......