By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

How to export or import data

P: n/a
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

Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Kajol wrote:
can u plz tell me how to import data from mysql to another database.
& how to export data from anotherdata base to mysql


http://dev.mysql.com/doc/mysql/en/mysqldump.html
Jul 23 '05 #2

P: n/a
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.
Jul 23 '05 #3

P: n/a
"Kajol" <bh*****@chantu.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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


Another option is to use MS Access as a "data translator/router".

Assuming you can obtain ODBC drivers for your target databases, you can
create linked tables in Access to MySQL and other database systems. There
is no reason why you couldn't park tables from 2, 3 or more different
systems inside a single MS Access file/database. You can then use Access
queries to INSERT or APPEND from MySQL tables to other flavors.

Thomas Bartkus
Jul 23 '05 #4

P: n/a
Hello jerry gitomer ,
Thanx for ur Code it really Work.
Jerry Can u plz tell me if u wish how can i use php for server side
validation

Thanx for Suggestion
regards
Kajol

Jul 23 '05 #5

P: n/a
Kajol wrote:
Hello jerry gitomer ,
Thanx for ur Code it really Work.
Jerry Can u plz tell me if u wish how can i use php for server side
validation

Thanx for Suggestion
regards
Kajol

Kajol,
I collect data using HTML forms which call PHP programs. I
have included my business rules in my PHP code and check each
data item for which I have rules. If any item fails I display
an error message and give the user a chance to make corrections.
If I am successful in validating the data I use it to update
the database.

HTH
Jerry
Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.