mysqlµ¼ÈëÊý¾Ý¿âÎÊÌâ
ÔÚdocÏÂÖ´Ðе¼ÈëÃüÁî mysql -uadmin -padmin student < d:\a.txt ʱÌáʾϵͳÕÒ²»µ½Îļþ£¬»·¾³±äÁ¿¶¼ÉèÖöÔÁË°¡£¬Ö®Ç°Ò²Ã»ÓгöÏÖ¹ýÕâ¸ö´íÎó£¬Çë´ó¼Ò°ïæ½â¾öÏ£¡Ð»ÁË£¡£¡
mysql -uadmin -padmin student < d:\\a.txt ÊÇÔÚϵͳDOSÏÂÖ´ÐеĻ¹ÊÇÔÚMYSQLÃüÁîÐÐÏÂÖ´ÐУ¿ Ó﷨û´í È·¶¨ÎļþÔÚÂ𣿠ÔÚdosÏÂcmd¿´¿´Îļþ£º SQL code: type d:\a.txt ÒýÓà mysql -uadmin -padmin student < d:\\a.txt Íü¼ÇÁË£¬¿ÉÄÜÎÒÒÔÇ°ÓõÄÊÇ·´Ð±¸Ü£¬Ó÷´Ð±¸ÜµÄ»°¾ÍÖ»ÓÃÒ»¸ö¶Ô°É¸÷λ£¿£¿£¿ ÔÚϵͳDOSÏÂÓÃÒ»¸ö·´Ð±¸Ü¾Í¿ÉÒÔÁË£¬ÄãµÄϵͳÊÇWINDOWS£¿ÒýÓà ÊÇÔÚϵͳDOSÏÂÖ´ÐеĻ¹ÊÇÔÚMYSQLÃüÁîÐÐÏÂÖ´ÐУ¿ ÔÚϵͳDOSÏÂÖ´ÐÐ ÎļþҲȷʵ´æÔÚÒýÓà ÔÚϵͳDOSÏÂÓÃÒ»¸ö·´Ð±¸Ü¾Í¿ÉÒÔÁË£¬ÄãµÄϵͳÊÇWINDOWS£¿ windows xp C:\Documents and Settings\Administrator>mysql -u root -p <"D://test/z1.txt" C:\Documents and Settings\Administrator>mysql -u root -p <"D:\test\z1.txt" C:\Documents and Settings\Administrator>mysql -u root -p <"D:\test/z1.txt" C:\Documents and Settings\Administrator>mysql -u root -p <"D://test\z1.txt" ¶¼¿ÉÒÔ Ó¦¸Ã¿ÉÒÔ£¬ÓÐÎÞÈ«½Ç¡¢°ë½ÇÎÊÌ
Ïà¹ØÎÊ´ð£º
ÔÚMySQL5.0Öд¬½¢´æ´¢¹ý³Ìͨ²»¹ý£¬Ìáʾ£º [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' ......
¹ØÓÚmysql´æ´¢¹ý³Ì±äÁ¿µÄÎÊÌ⣿±äÁ¿Ê²Ã´Ê±ºòÇ°ÃæÒª¼Ó@·ûºÅ£¬ÓÃdeclareÉùÃ÷µÄ±äÁ¿ÓëÇ°ÕßÓкÍÇø±ð£¬ÎÒ²»¶®£¿ @ÊÇÓÃÀ´ÆÁ±Î´íÎó»ò¾¯¸æµÄ£¬µ±Ç°Ãæ¼ÓÁË@·ûºÅºó£¬Èô´Ë´¦Óдí»ò¾¯¸æ£¬ÍøÒ³½«²»ÏÔʾ³öÀ´¡£ Ç°Ãæ¼Ó@´ú±í»á»° ......
ÎÒ֮ǰµ¼ÈëµÄÊý¾Ý¿â£¬ÏÖÔÚɾ³ý²»ÁË£¬ÓÃÁËÃüÁîÐк͹¤¾ß¶¼²»ÐУ¬ÖØÆôÒ²²»ÐУ¬ÕâÊÇΪʲôÄØ£¿ ÄãÊÇÈçºÎɾ³ýµÄ£¿ ÓÐʲôÌáʾ£¿ ÎÊÌâ˵Ã÷Ô½Ïêϸ£¬»Ø´ðÒ²»áԽ׼ȷ£¡²Î¼ûÈçºÎÌáÎÊ¡££¨ÌáÎʵÄÖǻۣ©
......
ϵͳµÄʼþ²é¿´Æ÷ÖпÉÒÔ¿´µ½Å¶ ÔØ£ºTable 'mysql.host' doesn't existµÄ´íÎó »¹ÊDz»Äܽâ¾öÎÊÌ⠲ο¼ÈçÏ indowsÏÂÐÞ¸ÄMySQL°²×°Ä¿Â¼ºÍMySQLÊý¾ÝĿ¼ 2009-04-04 08:49:20 ¡¡± ......