mysql,

How to Export All MySQL Databases

Mar 18, 2022 · 1 min read · Post a comment
How to Export All MySQL Databases

Keeping the database structure in one place and safe can sometimes be useful regarding disaster recovery. Exporting all MySQL databases into one SQL file it’s not a common thing but it can be a lifesaver.

Prerequisites

  • MySQL
  • MariaDB
  • root access

Export All MySQL Databases into one SQL file

To export all the MySQL databases you need to have access to the root user or another user who has admin rights to all databases.

mysqldump -u root -p --all-databases > alldb.sql

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.