The process of importing and exporting databases occurs frequently during the course of creating, updating and moving Web Apps. If you lose or damage your data, data dumps can be used to restore it. Data migration is another option that may be taken advantage of using these tools.
There are a number of ways to work with MySQL or MariaDB database dumps in this tutorial (the commands are interchangeable). You will import a database from a dump file once you have exported a database.
To import or export a MySQL or MariaDB database, you will need root Access to cloud VPS server or Dedicated server.
Why Import and export through command line?
Normally small databases can be imported and exported through phpMyAdmin. but in case of big databease files you will face many issues such as File upload size limit, Server time out. Those issues can easily overcome below method.
Import and Export Large Database files in MySQL or MariaDB
Login into your web server with root user using SSH.