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

MySQLÊý¾Ý¿â±àÂëÎÊÌâ

      ÔÚ³ÌÐò¿ª·¢ÖУ¬ÓÐʱ»á±»×Ö·ûÂÒÂëµÄÎÊÌâËùÀ§ÈÅ¡£¶Ô´Ë£¬±ØÐëÀí½â MySQL µÄ×Ö·û¼¯±àÂëÉèÖõÄÔ­Àí£ºÔÚMySQLÖУ¬Ä¬ÈÏʹÓõÄÊÇlartin1£¬Ò²¾ÍÊÇISO8859-1×Ö·û¼¯±àÂë¡£ÕâÊÇÒ»ÖÖ8λµÄ±àÂ룬ÊÊÓÃÓÚËùÓÐÎ÷Å·×Ö·û¡£¶ø¶ÔÓÚºº×ÖµÈÊDz»ºÏÊʵġ£×îºÃ¡¢×îͨÓõıàÂë¸ñʽÊÇutf-8£¬UTF-8£¨8 λԪ Universal Character Set£¯Unicode Transformation Format£©ÊÇÒ»ÖÖÕë¶ÔUnicode µÄ¿É±ä³¤¶È×Ö½Ú±àÂëµÄUnicode×Ö·û¼¯¡£Ëü¶ÔÓ¢ÎÄʹÓÃ8루¼´Ò»¸ö×Ö½Ú£©£¬ÖÐÎÄʹÓÃ24루Èý¸ö×Ö½Ú£©À´±àÂë¡£ËùÒÔ¶ÔÓÚ8λµÄÎ÷Å·×Ö·û¼¯À´Ëµ£¬¸üÄܱȽϽÚÊ¡¿Õ¼ä£¬¶øÓÖÄܹ»ÓÐЧµØ±íʾºº×ÖµÈ×Ö·û¡£ MySQL·þÎñÆ÷¶Ô×Ö·û¼¯ºÍУ¶Ô¹æÔòÓÐ4¸ö¼¶±ðµÄĬÈÏÉèÖ㺷þÎñÆ÷¼¶¡¢Êý¾Ý¿â¼¶¡¢±í¼¶ºÍÁ¬½Ó¼¶¡£
Ò»¡¢MySQLĬÈÏ×Ö·û¼¯
MySQL¶ÔÓÚ×Ö·û¼¯µÄÖ¸¶¨¿ÉÒÔϸ»¯µ½Ò»¸öÊý¾Ý¿â£¬Ò»ÕÅ±í£¬Ò»ÁУ¬Ó¦¸ÃÓÃʲô×Ö·û¼¯¡£µ«ÊÇ£¬´«Í³µÄ³ÌÐòÔÚ´´½¨Êý¾Ý¿âºÍÊý¾Ý±íʱ²¢Ã»ÓÐʹÓÃÄÇô¸´ÔÓµÄÅäÖã¬ËüÃÇÓõÄÊÇĬÈϵÄÅäÖÃ:
(1)±àÒëMySQL ʱ£¬Ö¸¶¨ÁËÒ»¸öĬÈϵÄ×Ö·û¼¯£¬Õâ¸ö×Ö·û¼¯ÊÇ latin1£»
(2)°²×°MySQL ʱ£¬¿ÉÒÔÔÚÅäÖÃÎļþ (my.ini) ÖÐÖ¸¶¨Ò»¸öĬÈϵĵÄ×Ö·û¼¯£¬Èç¹ûûָ¶¨£¬Õâ¸öÖµ¼Ì³Ð×Ô±àÒëʱָ¶¨µÄ£»
(3)Æô¶¯mysqld ʱ£¬¿ÉÒÔÔÚÃüÁîÐвÎÊýÖÐÖ¸¶¨Ò»¸öĬÈϵĵÄ×Ö·û¼¯£¬Èç¹ûûָ¶¨£¬Õâ¸öÖµ¼Ì³Ð×ÔÅäÖÃÎļþÖеÄÅäÖÃ,´Ëʱ character_set_server ±»É趨ΪÕâ¸öĬÈϵÄ×Ö·û¼¯£»
(4)µ±´´½¨Ò»¸öеÄÊý¾Ý¿âʱ£¬³ý·ÇÃ÷È·Ö¸¶¨£¬Õâ¸öÊý¾Ý¿âµÄ×Ö·û¼¯±»È±Ê¡É趨Ϊcharacter_set_server£»
(5)µ±Ñ¡¶¨ÁËÒ»¸öÊý¾Ý¿âʱ£¬character_set_database ±»É趨ΪÕâ¸öÊý¾Ý¿âĬÈϵÄ×Ö·û¼¯£»
(6)ÔÚÕâ¸öÊý¾Ý¿âÀï´´½¨Ò»Õűíʱ£¬±íĬÈϵÄ×Ö·û¼¯±»É趨Ϊ character_set_database£¬Ò²¾ÍÊÇÕâ¸öÊý¾Ý¿âĬÈϵÄ×Ö·û¼¯£»
(7)µ±ÔÚ±íÄÚÉèÖÃÒ»À¸Ê±£¬³ý·ÇÃ÷È·Ö¸¶¨£¬·ñÔò´ËÀ¸È±Ê¡µÄ×Ö·û¼¯¾ÍÊDZíĬÈϵÄ×Ö·û¼¯£»
×ܽ᣺Èç¹ûʲôµØ·½¶¼²»Ð޸ģ¬ÄÇôËùÓеÄÊý¾Ý¿âµÄËùÓбíµÄËùÓÐÀ¸µÄ¶¼Óà latin1 ´æ´¢£¬²»¹ýÎÒÃÇÈç¹û°²×° MySQL£¬Ò»°ã¶¼»áÑ¡Ôñ¶àÓïÑÔÖ§³Ö£¬Ò²¾ÍÊÇ˵£¬°²×°³ÌÐò»á×Ô¶¯ÔÚÅäÖÃÎļþÖÐ°Ñ default_character_set ÉèÖÃΪ UTF-8£¬Õâ±£Ö¤ÁËȱʡÇé¿öÏ£¬ËùÓеÄÊý¾Ý¿âµÄËùÓбíµÄËùÓÐÀ¸µÄ¶¼Óà UTF-8 ´æ´¢¡£
¶þ¡¢²é¿´Ä¬ÈÏ×Ö·û¼¯
²é¿´ÏµÍ³µÄ×Ö·û¼¯ºÍУ¶ÔµÄÉ趨¿ÉÒÔͨ¹ýÏÂÃæµÄÁ½ÌõÃüÁ
1. mysql> SHOW VARIABLES LIKE 'character%';
2. mysql> SHOW VARIABLES LIKE 'collation_%';
Èý¡¢ÐÞ¸ÄĬÈÏ×Ö·û¼¯
(1) ×î¼òµ¥µÄÐ޸ķ½·¨£¬¾ÍÊÇÐÞ¸ÄmysqlµÄmy


Ïà¹ØÎĵµ£º

mysqlµ¼ÈësqlÎļþ:Mysqlµ¼Èëµ¼³ö.sqlÎļþ

mysqlµ¼ÈësqlÎļþ:Mysqlµ¼Èëµ¼³ö.sqlÎļþ
²½ÖèÈçÏ£º
Ò».MYSQLµÄÃüÁîÐÐģʽµÄÉèÖãº
×ÀÃæ->ÎҵĵçÄÔ->ÊôÐÔ->»·¾³±äÁ¿->н¨->
PATH=“£»path\mysql\bin;”ÆäÖÐpathΪMYSQLµÄ°²×°Â·¾¶¡£
¶þ.¼òµ¥µÄ½éÉÜÒ»ÏÂÃüÁîÐнøÈëMYSQLµÄ·½·¨£º
1.C:\>mysql -h hostname -u username -p
°´ENTER ......

Apache + PHP + MySql °²×°


ËùÐèÈí¼þ£¨×¢Òâ°æ±¾£¡£©£º
Apache2.2.3 
PHP5.1.5 
MySQL5.0.24
ÕâÈý¸öÈí¼þ¶¼ÊÇÃâ·ÑµÄ£¬¿É´Ó¹ÙÍøÉÏÏÂÔØ£¬Ä¿Ç°ÎÒËùÓеÄÈí¼þÃûΪ£º
apache_2.2.3-win32-x86-no_ssl.msi 
mysql-5.0.24-win32.zip 
php-5.1.5-Win32.zip
»ùÓÚwindows²Ù×÷ϵͳ£¬ÔÚWindows XPÏ°²×°Ê¹Óãº
1¡¢°²×°¹ý³Ì£º  ......

jsp—MySqlÖÆ×÷B/sµÇ½µÄºÃÀý×Ó Ñ§Ï°±Ê¼Ç

½¨Á¢Ìõ¼þÊ×ÏÈÒ»¶¨ÒªÈ·¶¨×Ô¼ºµÄmysql£¬tomcat,eclipseÁ¬½ÓÊÇÕýÈ·µÄ¡£
index.jspºÜ¼òµ¥£¬¾ÍÒ»¸öÌøת¡£
<%
response.sendRedirect("lg.jsp");
%>
lg.jsp ʵÏֵǼ¿ò¼Ü
<%@ page contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>
login
</title>
</hea ......

mysql access deined

ÎÒµÄϵͳÊÇubuntu6.06£¬×î½üÐÂ×°ºÃµÄmysqlÔÚ½øÈëmysql¹¤¾ßʱ£¬×ÜÊÇÓдíÎóÌáʾ:
# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ʹÓÃÍøÉϽéÉܵķ½·¨ÐÞ¸ÄrootÓû§µÄÃÜÂ룺
# mysqladmin -uroot -p password 'newpassword'
Enter password:
m ......

[ת]Mysql Sourceµ¼ÈëÂÒÂëÎÊÌâ

      1¡¢È·¶¨Êý¾Ý¿âĬÈϱàÂ룬±ÈÈç±àÂëΪutf8,½«¶ÁÈë;¾¶±àÂëͬÑùÉèΪutf8£¬ÃüÁîΪ£ºset names utf8;
      2¡¢source d:/20080613.sql µ¼ÈëÊý¾Ý¡£ÑéÖ¤Êý¾Ý¿âÖеÄÊý¾ÝÊÇ·ñ´æÔÚÂÒÂë¡£
      3¡¢Èç¹ûÈÔÈ»´æÔÚÂÒÂëÎÊÌ⣬Õâʱºò¾ÍÒª¿¼ÂǸı䵼ÈëÎļþµÄ±à ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ