Creating and editing MySQL DB Dumps

The following information contains the commands required to create a DB dump of your database. It also gives the commands to export your database to your new database. The information required to edit the copy of your database by replacing information is located here as well.


mysqldump -u root -p Abrahams > update.dmp

Conneting to mysql RDS instance:
mysql -h -P 3306 -u Imraan -p —Connects to RDS DB
mysql -h -P 3306 -u Imraan -p WordPressDB –Connects directly to DB

Creating a Dump:
mysqldump -h -P 3306 -u Imraan -p WordPressDB > test2.mysql

mysqldump -u Imraan -p WordPressDB > test2.mysql

-Wordpress DB -This is the name of the database you are creating a copy of test2.mysql or test2.dmp (Can be in either format) is the copy of the database you created(dump)

Importing Dump to DB:
mysql -h -P 3306 -u Imraan -p WordPressDB < Abrahams.mysql

-Abrahams.msql is the copy of the database you are copying to the new database
-WordpressDB is the new database, you can create this databse prior to copying the copy over or create the database name using the command above. When executing the command, the databse will be created automatically


Command to replace 52-29-00-204 with 34-232-000-220.



:%s/ip/ip/g ( g = globally)

If you need to replace /var/www/html for example

:%s#/var/www/html#/var/www/vhosts#g Using the hash instead of / here






mysql -h -P 3306 -u Imraan -p WordPressDB < update.dmp

No token or token has expired.

Leave a Reply

Your email address will not be published. Required fields are marked *