2

I have MySQL 5.0 and 5.5 servers (but not a 5.1 server). The 5.0 server is myisam only, the 5.5 default is innodb. I need to move a database from the 5.0 server to the 5.5 server. The database is not big, the dump is about 32M. Both servers are Linux.

I ran a test by importing the 5.0 database into the 5.5 (after editing dumpfile from MYISAM to INNODB) server and then diffing mysqldumps from both servers. If I use --order-by-primay for the dump, the diffs are only what I would expect (version, engine, dump time, etc).

Any gotchas that I am missing? Can I import a myisam 5.0 database into a 5.5 innodb server without bad surprises?

names_are_easy
  • 75
  • 1
  • 10

1 Answers1

0

A mysqldump will attach ENGINE=MyISAM and ENGINE=InnoDB to every CREATE TABLE statement.

You should be fine.

WARNING : There is one gotcha !!!

The mysql database itself (where the grant tables reside) have different column layouts between versions of mysql.

You can dump all databases from MySQL 5.0 EXCEPT the mysql database.

It is much better to port the mysql grants using pt-show-grants.

Here is my personal emulation of what pt-show-grants does

mysql -hhostaddr -umyuserid -pmypassword --skip-column-names -A -e"SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') FROM mysql.user WHERE user<>''" | mysql -hhostaddr -umyuserid -pmypassword --skip-column-names -A | sed 's/$/;/g' > MySQLUserGrants.sql
RolandoMySQLDBA
  • 185,223
  • 33
  • 326
  • 536