How to export data from MariaDB database?

To export data from a MariaDB database, you can use the mysqldump command. Here are the steps to export the database data:

  1. Open the command prompt or terminal window.
  2. Export the entire database using the following command.
  3. Backup the database “数据库名” as a file named “导出文件名.sql” using the MySQL command “mysqldump -u 用户名 -p”
  4. Please replace “username” with your database username, “database name” with the name of the database you want to export, and “export file name” with the file name you wish to export the data to.
  5. If the database has a password, please enter it as instructed.
  6. If you only want to export specific tables, you can use the following command:
  7. Export database tables 1 and 2 from the specified database using the given username, saving the result to a file named 导出文件名.sql.
  8. Please replace “username” with your database username, “database name” with the name of the database you wish to export, “table 1” and “table 2” with the names of the tables you want to export, and “export file name” with the name of the file you want to export the data to.
  9. If there is a password for the database, please enter it as instructed.
  10. After executing the command, the exported data will be saved in the designated export file.

Please note that the exported data file is a plain text file that can be opened and viewed using a text editor.

bannerAds