Webeks.net - freelance programming
freelance programming - php, Joomla, Zend ...
Home :: Articles :: Programming :: PHP :: Import / export large MySQL dumps on Windows

Import / export large MySQL dumps on Windows

Written by Miha

I've to import 1GB MySql dump file today. It was the biggest MySql dump I've ever worked with and it gave me a bit of problems before I managed to imported it on my development platform.

phpMyAdmin is unsuitable for this kind of tasks and other Windows GUI tools I have for dealing with MySql were unusable as well.

The key was to modify my.ini file and increase max_allowed_packet value.

Then I used windows command line tool (run cmd) to import sql dump.

  1. mysql -u[Username] -p[Password] [Database] < dump.sql

If I'd want to export database I'd use

  1. mysqldump -u[Username] -p[Password] [Database] > output.sql

blog comments powered by Disqus