Linx Trix

November 9, 2007

Importing large data files in MySQL

Filed under: easy, mysql — admin @ 2:04 pm

You tried phpmyadmin, you tried cat some_large_file | mysql -uuser -p -Ddatabase but it complains too? Then simply do SOURCE <large file name> while in the mysql console and it will work.

The only problem could be if you still get the error on some lines is to increase the max_allowed_packet if there are large blob’s in your dump.

There are some alternatives like BigDump, but that’s installing additional tools for the job which is not always necessary.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Live
  • Propeller
  • Technorati
  • Google Bookmarks
  • YahooMyWeb

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress