mysqlµ¼Èëµ¼³öÊý¾Ý¿â
¼¸¸ö³£ÓÃÓÃÀý£º
1.µ¼³öÕû¸öÊý¾Ý¿â mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql2.µ¼³öÒ»¸ö±í mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû ±íÃû> µ¼³öµÄÎļþÃû mysqldump -u wcnc -p smgp_apps_wcnc users> wcnc_users.sql3.µ¼³öÒ»¸öÊý¾Ý¿â½á¹¹ mysqldump -u wcnc -p -d --add-drop-table smgp_apps_wcnc >d:\wcnc_db.sql
-d ûÓÐÊý¾Ý --add-drop-table ÔÚÿ¸öcreateÓï¾ä֮ǰÔö¼ÓÒ»¸ödrop table
4.µ¼ÈëÊý¾Ý¿â ³£ÓÃsource ÃüÁî ½øÈëmysqlÊý¾Ý¿â¿ØÖÆ̨£¬ Èçmysql -u root -p mysql>use Êý¾Ý¿â
È»ºóʹÓÃsourceÃüÁºóÃæ²ÎÊýΪ½Å±¾Îļþ£¨ÈçÕâÀïÓõ½µÄ.sql£© mysql>source d:\wcnc_db.sql
×¢ÒâËùÓÐÃüÁîÔÚwinÃüÁîÐÐÏÂÖ´ÐÐ
ÁímysqlÊý¾Ý¿âĬÈϱàÂëÊÇlatin1
ÐÞ¸Ämy.iniÀïµÄdefault-character-set=utf8£¨ÐÞ¸ÄÁ½´¦£©
Ïà¹ØÎĵµ£º
ÔÚʹÓÃWindowsÃüÁîÐвÙ×÷MySQLÊý¾Ý¿âµÄʱºò£¬ÒÔutf8¸ñʽ´æ´¢ÔÚMySQLÊý¾Ý¿âÖеÄÊý¾Ý£¬´ÓÃüÁîÐжÁÈ¡³öÀ´×ÜÊÇÂÒÂ룬ÏÔʾȫÊÇÎʺš£»òÕß´ÓÃüÁîÐвåÈëÐÂÊý¾Ý£¬½á¹ûÏà·´£¬ÔÚÃüÁîÐÐÖÐÏÔʾÊÇÕý³£µÄ£¬µ«ÊÇÔÚPHPMyAdminÖÐÈ´ÊÇÂÒÂë¡£
¡¡¡¡¾¹ýÉÏÍø²éÕÒÑо¿£¬·¢ÏÖmysqlµÄÃüÁîÐпͻ§¶Ë¸ù±¾ÎÞ·¨ÒÔutf-8µÄÐÎʽ·µ»ØÊý¾Ý£¬½â¾öÈçÏ¡£
¡¡¡¡² ......
½ñÌìʹÓÃPowerDesigner´î½¨ÁËÒ»¸öСÏîÄ¿£¬×îºóÖ´ÐÐÍêSQL½Å±¾Ê±²Å·¢ÏÖÓÐ2ÕűíµÄ±íÃûÖмä¶àÁËÒ»¸ö¿Õ¸ñ£¬²éÍê×ÊÁÏ£¬×îºó²¢¾ªÆæ·¢ÏÖÓ³ÉäÎļþ¾¹È»¶àÁË2¸ö`,¾ÍÊÇshift+Êý×Ö¼ü1µÄÄǸö£¬Ò²¾ÍÊÇËûÔڽű¾ÊÇÕâÑùдµÄ£º
create table `table1`(....);
ÎÊÌâ½â¾ö¡£
PS:´ÓÍøÉÏÕÒµ½µÄ×ÊÁÏ£º
×÷Ϊһ¸öOracle DBA£¬MySQLºÜ¶àSQLÓï·¨ÓëOrac ......
°²×°ÅäÖÃmysql
http://edu.codepub.com/2009/1213/18710.php
Ò»¡¢
ÏÂÔرàÒë°²×°
#cd /usr/local/src/
#wget http://mysql.byungsoo.net/Downloads/MySQL-5.1/mysql-5.1.38.tar.gz
#tar –xzvf mysql-5.1.38.tar.gz ../software/
#./configure
--prefix=/usr/local/mysql //MySQL°²×°Ä¿Â¼
--datadir=/mydata / ......
select `a`.`id` AS `id`,`a`.`UserName` AS `UserName`,
(case when (`a`.`sRegDate` = _utf8'1990-01-01 00:00:00.0') then _utf8'' else cast(date_format(`a`.`sRegDate`,_utf8'%Y-%m-%d %H:%i:%S') as char charset utf8) end) AS `sRegDate`,(case when (`a`.`feeendtime` = _utf8'1990-01-01 00:00:00.0') then _ut ......