Take the 2-minute tour ×

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

1 Answer 1

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 –  Vittorio Vittori May 23 '12 at 10:42

Your Answer


