Kajol wrote:
Hi All,
can u plz tell me how to import data from mysql to another database.
& how to export data from anotherdata base to mysql
Thanx for ur Advice
Regards
Kajol
There are two ways of doing what you want.
The easy way is to use the database command that creates backup
files, edit the resulting flat file to conform to the syntax the
target database expects, and load the backup file into the
target database. Typically you will have to run these commands
from the command line. For example to create a dump file from
MySQL you would issue the command:
:> mysqldump -u <user-name> -p <database-name> > <file-name>
This will create a flat file, complete with CREATE TABLE
statements, needed to create and load back into a MySQL
database. Edit the flat file so that the syntax conforms to
that of the RDBMS you will be loading into.
If the target was another MySQL database you use the command:
:> mysql -u <user-name> -p <database-name> < <file-name>
The hard way is to write SQL statements and scripts that do the
same thing.