The basics of importing and exporting data
There are several reasons for importing data into MariaDB, or for exporting data from it. The most common reason is taking a backup. In most databases, the data changes frequently. This means that a backup becomes old very quickly. For this reason, we should back up our important data regularly as well as frequently. If data gets lost for any reason, like due to a server crash or due to a bug in an application, we will need to import our backup.
Note that taking a backup before doing something that involves any risk is very important too. For example, we should always take a backup before upgrading our MariaDB version, or before replacing MySQL with MariaDB. It is very unlikely that such operations will cause any damage, but in case it happens we would like to be ready.
We could also export our data to import it into another server, or distribute it as part of an application. It need not be a MariaDB server; it could be MySQL or, in many cases, it...