mysqlÊý¾Ýµ¼³öµ½sqlserver·½·¨
ÕâÀïÊÇʹÓÃODBCÀ´×ª»»Êý¾Ý¿âµÄ¡£
1.°²×°mysqlÊý¾Ý¿âµÄODBCÇý¶¯£¬mysql¹ÙÍøÓÐÏÂÔØhttp://dev.mysql.com/downloads/connector/odbc/
2.´ò¿ª¿ØÖÆÃæ°å\¹ÜÀí¹¤¾ß\Êý¾ÝÔ´ODBC£¬ÔÚÓû§DSNÖÐÌí¼ÓÒ»¸öMySQL ODBC Êý¾ÝÔ´¡£
3.½Ó×ÅÔÚÏÂÃæµÄ´°ÌåÖÐÊäÈëÊý¾ÝÔ´Ãû³Æ£¬Èçmysqlodbc£»È»ºóÊäÈë·þÎñÆ÷ServerµØÖ·£¨localhost»òÆäËû£©£¬Óû§User£¬ÃÜÂëPassword£¬ÊäÈëÕýÈ·ºóÑ¡ÔñÒªµ¼ÈëµÄÊý¾Ý¿â¡£ÔÚÁ¬½ÓÑ¡Ïîconnect optionsÖиù¾ÝÐèÒªÉèÖÃMySqlʹÓõĶ˿ÚportºÍ×Ö·û¼¯Character Set¡£ ×Ö·û¼¯Ò»¶¨ÒªºÍMysql·þÎñÆ÷Ïà¶ÔÓ¦£¬Èç¹ûMysqlʹÓÃÁËgbk×Ö·û¼¯£¬ÔòÒ»¶¨ÒªÉèÖÃ×Ö·û¼¯Îªgbk£¬·ñÔòµ¼Èëµ½Sql Server¿ÉÄÜ»á³öÏÖÎʺÅÂÒÂë¡£
4.´ò¿ªsql serverÆóÒµ¹ÜÀíÆ÷£¬Ð½¨Ò»Êý¾Ý¿âMySql¡£Ñ¡Ôñ¸ÃÊý¾Ý¿â£¬µ¥»÷ÓÒ¼üÑ¡ÔñËùÓÐÈÎÎñ\µ¼ÈëÊý¾Ý¡£
5.Ñ¡ÔñÊý¾ÝԴΪÆäËü(ODBCÊý¾ÝÔ´)£¬Óû§/ϵͳDSNΪmysqlodbc¡£ÆäÓà¸ù¾ÝÏòµ¼½øÐУ¬¼´¿É½«Êý¾Ý´ÓMySqlÊý¾Ý¿âµ¼Èëµ½MSSQLÊý¾Ý¿âÖС£
µ¼Èëµ½sqlserverµÄÊý¾Ý¿â¿ÉÄÜÓÐЩ±íÓдíÎ󣬱ÈÈç±íÖÐÊý¾Ýδµ¼È룬±íÖ÷¼üδÉèÖã¬×ֶθñʽ²»ÕýÈ·µÈµÈ£¬ÒªÖØÐÂÉèÖûò²åÈë¡£
Ïà¹ØÎĵµ£º
DATETIME¡¢DATE ºÍ TIMESTAMP ÀàÐÍÊÇÏàËƵġ£±¾ÆªÃèÊöÁËËüÃǵÄÌØÐÔÒÔ¼°ËüÃǵÄÏàËƵãÓ벻ͬµã¡£
DATETIME ÀàÐÍ¿ÉÓÃÓÚÐèҪͬʱ°üº¬ÈÕÆÚºÍʱ¼äÐÅÏ¢µÄÖµ¡£MySQL ÒÔ 'YYYY-MM-DD HH:MM:SS' ¸ñʽ¼ìË÷ÓëÏÔʾ DATETIME ÀàÐÍ¡£Ö§³ÖµÄ·¶Î§ÊÇ '1000-01-01 00:00:00' µ½ '9999-12-31 23:59:59'¡£(“Ö§³Ö”µÄº¬ÒåÊÇ£¬¾¡¹Ü¸üÔ ......
ÁíÍâMySql¹Ù·½³öÁËÒ»¸öÔÚcsharpÀïÃæÁ¬½ÓMySqlµÄConnector£¬¿ÉÒÔÊÔÊÔ
http://dev.mysql.com/downloads/#connector-net
<add name="mysql" connectionString="server=125.46.37.170;uid=root;pwd=;"/>
±¨´í£ºUnable to connect to any of the specified MySQL hosts.
½ñÌì×öÏîĿʱºò¾ÍÓöµ½ÕâÎÊ ......
Ò»°ãÔÚMYSQLʹÓÃÖÐÎIJéѯ
¶¼ÊÇÓà set NAMES character
character_set_client £¬ÕâÊÇÓû§¸æËßMySQL²éѯÊÇÓõÄʲô×Ö·û¼¯¡£
character_set_connection £¬MySQL½ÓÊܵ½Óû§²éѯºó£¬°´ÕÕcharacter_set_client½«Æäת»¯Îªcharacter_set_connectionÉ趨µÄ×Ö·û¼¯¡£
character_set_results £¬ MySQL½«´æ´¢µÄÊý¾Ýת»»³Écharact ......
grant all on *.* to root@'192.168.10.131' identified by 'admin';
LOAD DATA INFILE (´ÓÎļþÖе¼ÈëÊý¾Ý)
mysqldump -u pivot -p pivot news > c:\news.sql
ÄÇô»¹Ô¿ÉÒÔmysqlÃüÁmysql -u Óû§Ãû -p (ÃÜÂë) -h Ö÷»úÃû --one-database »¹ÔÊý¾Ý¿âÃû < ·¾¶/±¸·ÝÃû.bak,--one-databaseÊÇÖ¸ ......