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

Dani AI

Generated

Short summary and troubleshooting focused on ’s problem (missing dump file), building on ’s, ’s and ’ suggestions.

Common workflow (conceptual): produce a logical dump on the development machine, transfer that dump to the production server, then import it there. Compression helps for transfer size and speed (as noted). Third‑party tools can automate this (as mentioned), but it is still useful to understand what happens under the hood.

Why you might not find the .sql file

  • The dump program writes to stdout by default. If you did not explicitly write to a file (or give an absolute path), the output may have gone to the terminal or to a directory you did not expect.
  • Running the dump command from inside the MySQL interactive prompt will not create a file — the utility must be run from the operating system shell.
  • On Windows, running a script by double‑clicking can set the working directory to System32 or a temporary folder; use a Command Prompt opened in the folder you want, or specify a full path (for example, a folder in your user profile).
  • phpMyAdmin exports are downloaded to the browser client (check your browser’s Downloads folder). Browser/server PHP limits can also truncate large exports.

Practical checks and safe next steps

  • Search the machine for recent .sql files or list the current shell directory before rerunning.

  • Re-run the dump from an interactive shell and save to a known absolute path. Make sure the account has write permission to that location.

  • Transfer the file securely (scp/SFTP) to production and import with the server‑side MySQL client or phpMyAdmin (watch upload limits). Example transfer:

    scp /full/path/mydump.sql user@production:/tmp/

Security and reliability notes

  • Avoid embedding plain passwords on the command line; use a prompt or protected client configuration. For large/active databases, use transaction‑safe dump options to avoid inconsistent snapshots. For phpMyAdmin export details and dump best practices, see the phpMyAdmin docs and a practical mysqldump guide: and .

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.