Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not an advanced database user, so now I would move an old site to a new hosting where I have all new material, can I use an old MySQL database 4.1 data in a 5.0.51a server?

share|improve this question
up vote 2 down vote accepted

No problem there. Just export your database from MySQL 4:

mysqldump -p --opt dbname >dbname.sql 

and import it in your MySQL 5:

mysql -p -D dbname <dbname.sql

Just a note: In MySQL version 5, the field type varchar binary is no longer available.

share|improve this answer
there is an /usr/bin/mysql_upgrade which handles a bunch of the schema conversions – Tom H May 23 '12 at 9:23
tested and worked, thanks – vitto May 23 '12 at 10:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.