Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
2  
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

 
discard

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.