Ubuntu 9.04 ÏÂMySQLÖÐÎÄÂÒÂëµÄ½â¾ö
Ubuntu 9.04 ÏÂÓÃÔ´°²×°ÁËMySQL¡£Ä¬ÈÏÇé¿öÏ£¬ÓÃmysql shellµÇ¼´´½¨Êý¾Ý¿â´´½¨±í²åÈëÖÐÎÄÊý¾Ýºó£¬ÓÃselect²é³öÀ´ÊÇÖÐÎÄ£¬µ«ÓÃJDBCÁ¬½Ó¾Í³öÏÖÂÒÂë¡£ÍøÉÏËÑË÷µ½½â¾ö·½·¨£¬ÈçÏ£¨Ïȱ¸·ÝÊý¾Ý£©£º
ÐÞ¸Ä/etc/mysql/my.cnf
sudo gedit /etc/mysql/my.cnf
ÔÚmy.cnfÎļþÖеÄ[client]¶ÎºÍ [mysqld]¶Î¼ÓÉÏÒÔÏÂÁ½ÐÐÄÚÈÝ£º
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
ÐèÒªÖØÆômysql·þÎñ
Í£Óãº
sudo mysqladmin shutdown -u root -p
È»ºóÊäÈëmysqlµÄrootÓû§µÄÃÜÂë
ÆôÓãº
sudo mysqld_safe -user=mysql &
²é¿´Ò»ÏÂÏÖÔÚmysqlµÄ±àÂë
sudo mysql £u root -p
mysql>show variables like 'character%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
ÏÖÔÚ²»¹ÜÔÚmysql shellÏ»¹ÊÇJDBC¶¼¿ÉÒÔÕý³£ÏÔʾÖÐÎÄÁË¡£µ«Ö®Ç°µÄÊý¾Ý»¹ÊDz»ÐУ¬ËùÒÔÔÚÕâ֮ǰµÃÏȱ¸·ÝÊý¾Ý£¬ÐÞ¸ÄÍê±àÂëºóÔÙµ¼Èë¡£
Ïà¹ØÎĵµ£º
Ô±¾µÄÄ¿µÄÊǽ«Êý¾Ý¿â´ÓMS SQL 2000ǨÒƵ½MySQLÖУ¬µ«ÌáʾJDBCÁ¬½Óʧ°Ü£¬ÎÞÄÎÖ®¼«£¬Ö»ºÃÑ¡ÔñÖмäÇÅÁºAccessÍê³ÉÕâÏîÁîÈËÌÖÑáµÄ¹¤×÷ÁË¡£
´ó¸Å²½ÖèÈçÏ£º
1£¬´ÓMS SQL 2000½«Êý¾Ýµ¼³öµ½AccessÖУ¬ÓÐ¹Ø±í¶¨ÒåºÃÖ÷¼üºÍ×Ô¶¯±àºÅ²¿·Ö²»È»Ç¨ÒƺóÓÖµÃÐÞ¸ÄMySQLµÄ±í¡£
2£¬ÐÞ¸ÄAccess±íÖйÜÀíÔ±×é¡¢¹ÜÀíÔ±µÄȨÏÞ£¬±£Ö¤AccessµÄÄÚÖà ......
MySQL³£ÓòÙ×÷»ù±¾²Ù×÷£¬ÒÔ϶¼ÊÇMySQL5.0ϲâÊÔͨ¹ýÊ×ÏÈ˵Ã÷Ï£¬¼ÇסÔÚÿ¸öÃüÁî½áÊøʱ¼ÓÉÏ£»£¨·ÖºÅ£©
1.µ¼³öÕû¸öÊý¾Ý¿â
mysqldump -u Óû§Ãû -p --default-character-set=latin1 Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû(Êý¾Ý¿âĬÈϱàÂëÊÇlatin1)
mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
2.µ¼³öÒ»¸ö±í
mysqldump -u Ó ......
³õ´Î°²×°·½·¨£º
1¡¢È¥¹Ù·½ÏÂÔØMYSQL 5.0¡£
¡¡¡¡2¡¢Ð޸ķÀ»ðǽµÄÉèÖã¬ÔÚÔÊÐíÀýÍâÀïÌí¼ÓеĶ˿ڣ¬Ãû×ÖΪmysql£¬¿ª·ÅµÄ¶Ë¿ÚΪTCP 3306¡£
¡¡¡¡Õâ¸ö´ó¼ÒÓ¦¸Ã¶¼»á£¬ÔÚVista¿ØÖÆÃæ°åµÄWindows·À»ðǽÀïÃ棬µã»÷“¸ü¸ÄÉèÖÔ-“ÀýÍ┣¬µã»÷“Ìí¼Ó¶Ë¿Ú”¾Í¿ÉÒÔ¡£¡¡¡¡
......
mysqlÓÅ»¯£º ÄÚ´æ±íºÍÁÙʱ±í
2009Äê02ÔÂ01ÈÕ ÐÇÆÚÈÕ 10:41
ÓÉÓÚÖ±½ÓʹÓÃÁÙʱ±íÀ´´´½¨Öмä±í£¬ÆäËٶȲ»ÈçÈËÒ⣬Òò¶ø¾ÍÓÐÁË°ÑÁÙʱ±í½¨³ÉÄÚ´æ±íµÄÏë·¨¡£µ«ÄÚ´æ±íºÍÁÙʱ±íµÄÇø±ðÇÒ²¢²»ÊìϤ£¬ÐèÒª²éÕÒ×ÊÁÏÁË¡£
Ò»¿ªÊ¼ÒÔΪÁÙʱ±íÊÇ´´½¨ºó´æÔÚ£¬µ±Á¬½Ó¶Ï¿ªÊ±ÁÙʱ±í¾Í»á±»É¾³ý£¬¼´ÁÙʱ±íÊÇ´æÔÚÓÚ´ÅÅÌÉϵġ£¶øʵ¼Ê²Ù×÷Öз¢ÏÖÁÙÊ ......
1. ÔÚʹÓÃNavicat 8 for MySQL¿Í»§¶Ë´´½¨Êý¾Ý¿âʱ£¬±àÂëµÄÉèÖÃÈçÏÂͼ£º
2. ½«°²×°Ä¿Â¼F:\MySQL\MySQL Server 5.1Ï£¬my.iniÎļþÉèÖñäÁ¿Öµdefault-character-set=gbk £¨°üº¬Á½´¦£¬¿É²éÕÒdefault-character-set£©£¬È»ºóÖØÆôMYSQL·þÎñ¡£ ......