Please refer to the following information for exporting it properly (which can be done ONLY at the 3.23 server), and converting it to applicable format for MySQL 5 import. Also note that before exporting you MUST convert the tables to MyISAM engine.

On the OLD system:
1: Dump out the tables

$ mysqldump --add-drop-table --add-locks --all
--quick --lock-tables mydatabase > mydatabase.sql

2: Convert from Latin1 character encoding to UTF8

$ iconv -f latin1 -t utf8 < mydatabase.sql > mydatabase_utf8.sql

3: Update auto_increment SQL definitions

$ sed -e "/auto_increment/ s/DEFAULT '0'//" database_utf8.sql > mydatabase_utf8_filtered.sql

4: Transfer the file to the new system

On the NEW system:

5: Create a SQL header lines with this content into a file called 'sql_headers'.:

set names utf8;
drop database if exists mydatabase;
create database mydatabase_inv character set utf8;
use chem_mydatabase;

6: Remove the leading comments on the SQL file
Strip everything down to the first real SQL statement.

-- MySQL dump 8.22
--
-- Host: localhost Database: mydatabase
---------------------------------------------------------
-- Server version 3.23.54

--
-- Table structure for table 'table1'
--

7: Load the SQL into your database

cat sql_headers mydatabase_utf8.sql | mysql -u root -p

Was this answer helpful? 24 Users Found This Useful (98 Votes)