MySQL

Learn how to upload MySQL database backups to Filebase.

What is MySQL?

MySQL is a popular and widely used open-source relational database management system.

Read below to learn how to upload a MySQL database backup to Filebase.

Prerequisites:

1. You can use the following command to create a dump of your MySQL data from all databases.

mysqldump -u [user] \
-p [password] \
-h [host] \
--single-transaction \
--routines --triggers \
--all-databases

2. Then, save the output of this command to a file:

mysqldump -u [user] \
-p [password] \
-h [host] \
--single-transaction \
--routines --triggers \
--all-databases | gzip > mysql_backup.sql.gz

3. Then you will need to upload the mysql_backup.sql.gz file to Filebase.

You can use a variety of tools for this, but this guide will use AWS CLI.

5. Configure AWS CLI to work with Filebase and your Filebase account. To do this, run the command:

aws configure

This command will generate a series of prompts, asking for the Access Key ID and Secret Access Key. It will also ask for a region and an output format, though you can leave both of these fields blank by pressing enter when prompted for them.

For more information on AWS CLI, see our full guide here.

6. After completing the prompt, you can upload your mysql_backup.sql.gz file file to Filebase with the command:

aws --endpoint https://s3.filebase.com s3 cp mysql_backup.sql.gz s3://filebase-bucket

Last updated