I want to know how to copy the mysql database on my development PC to mysql server on my production PC. Please, anyone who knows how to go about this should help me.

Thanks!

JNORA

Recommended Answers

All 4 Replies

Hi.

You can use PhpMyAdmin to export/import it
or mysqldump and mysql to backup/restore db.

Example with mysqldump and mysql :

1. mysqldump --user=username --password database > filetosaveto.sql

2. mysql --user=username --password database < dumpfile.sql


- Mitko Kostov

If you feeling lazy, download this application, haven't used it but maybe it will be of some help.

Link

It is a trial, so im unaware of the limitations

Hi.

You can use PhpMyAdmin to export/import it
or mysqldump and mysql to backup/restore db.

Example with mysqldump and mysql :

1. mysqldump --user=username --password database > filetosaveto.sql

2. mysql --user=username --password database < dumpfile.sql


- Mitko Kostov

Mitkok,

Thanks for your response. But, i need some elaboration on these. Because,when i tried the your first method above. the code seemed to work partially due to the fact that; after hitting my 'enter' key i was prompt for a password and i supplied the database password and recieved no error message after hitting the 'enter' key again.

However, my point of confusion remains the fact that i could not find any text file like 'mybackup.sql' saved in any directory on the system. Please, why is it so? Because in my understanding i feel it is the 'mybackup.sql' i am supposed to transfer to my production server.

Thank! ---JNORA---

When taking a backup in phpmyadmin, select the "gzipped compression" mode. You will then be asked for a filename to save. gzip format will result in smaller files for backup and restore.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.