How to import table structure?
am 06.04.2006 22:58:04 von Lei
Greetings
I am doing a job to migrate an informix database server to mySQL DB. There
are 20 12 database which contains 300 tables.
I have made table data move working by using LOAD series SQL commands. But
it is very slow to copy table structure. Rightnow I create table one by
using (CREATE TABLE ......... ).
Is there any smart way of importing table structure?
Thanks
Re: How to import table structure?
am 07.04.2006 18:16:03 von nc
Dave wrote:
>
> I am doing a job to migrate an informix database server to mySQL DB. There
> are 20 12 database which contains 300 tables.
>
> I have made table data move working by using LOAD series SQL commands.
> But it is very slow to copy table structure. Rightnow I create table one by
> using (CREATE TABLE ......... ).
>
> Is there any smart way of importing table structure?
Sure. Put all your CREATE TABLE queries into one text file (let's call
it q.txt) and run the following command line:
mysql -u [username] -p[password] [db_name] < q.txt
Note that there is no whitespace between -p and the password...
Cheers,
NC