mysql -hhost_name -Pportnumber -uuser_name -ppassword < yourfile.txtin the txt file you must have a standard format of insert statement. If not, you have to use a tool like "Textpad" which is well in the trick to handle the trivial data into the correct format. first just try 10 rows and remember the workflow .. after it works, handle the huge file..good luck!

解决方案 »

  1.   

    楼上兄弟 那个命令好象不是倒入数据的,是倒入SQL命令的吧
    如果那样的话 那么这个文本文件是倒入到哪个数据库的哪个表里面了呢?
    小弟愚昧,请楼上兄弟指教!
      

  2.   

    请参考:http://expert.csdn.net/Expert/topic/2316/2316372.xml?temp=.3539545http://expert.csdn.net/Expert/topic/2265/2265923.xml?temp=.2191889http://expert.csdn.net/Expert/topic/2186/2186290.xml?temp=.5829584
      

  3.   

    load data local infile 'xxx.txt' into table table_test;