Thursday, December 11, 2008

How to import mysql database from dump?

Simply use the following command (on Windows):

mysql.exe --default-character-set=utf8 -u root database_name < path\to\dump\file.sql

Assuming that you are using:
  • mysql without any password (if you still use password, then use -p option)
  • username root
  • dump file in utf8 encoding

No comments: