There are times during migrations, database restores etc that you will need to export and import your MySQL database. Below shows you the commands required to achieved this.
Note : This article is meant as a reference point rather then a full blown article.
Export
mysqldump -u root -p {database} > db.sql
Import
mysql -u root -p -h 127.0.0.1 {database} < db.sql
Latest posts by Rick Donato (see all)
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a database expert?
Here is our hand-picked selection of the best courses you can find online:
Ultimate MySQL Bootcamp
Complete SQL Bootcamp
MongoDB Complete Developer course
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial