Restore your MySQL Database on PlanetScale
Tags: mysql, planetscale, database, restore
Published: 2023-11-03 14:41:45

---
title: 'Restore your MySQL Database on PlanetScale'
description: 'A Guide to Restore your MySQL Database on PlanetScale using SimpleRestore.io with a single click.'
cover_image: 'https://simplerestore.io/assets/posts/restore-your-mysql-database-on-planetscale/cover.png'
canonical_url: 'https://simplerestore.io/restore-your-mysql-database-on-planetscale'
tags: mysql, planetscale, database, restore
published: true
---

[PlanetScale](https://planetscale.com/) offers a cloud-native, serverless, and multi-cloud MySQL database service. It's designed to provide high availability, scalability, and simplicity for your database needs. With features like automatic sharding, you can scale your database effortlessly.

{% embed https://www.youtube.com/embed/2zU_9wd209o %}

## How to Create a PlanetScale MySQL Database

1. Sign in to your PlanetScale account and navigate to the dashboard.
  ![PlanetScale Dashboard](https://simplerestore.io/assets/posts/restore-your-mysql-database-on-planetscale/planetscale-create-db.png "PlanetScale Dashboard")

2. Click on "Create Database" and follow the prompts to set up your database.
3. When you're done, you'll be redirected to a page where you can create a new password, in order to grab your connection string, select "Rust" or "Prisma" as your framework or programming language.
  ![PlanetScale password creation](https://simplerestore.io/assets/posts/restore-your-mysql-database-on-planetscale/planetscale-select-langauge.png "PlanetScale password creation")

4. Take note of your database connection string, as you'll need it later.

## How to Restore a PlanetScale Dump on a Remote Database using SimpleRestore.io

SimpleRestore.io is a user-friendly tool that simplifies the process of restoring a MySQL database. Follow these steps:

1. Visit [SimpleRestore.io](https://simplerestore.io)
  ![SimpleRestore.io](https://simplerestore.io/assets/posts/restore-your-mysql-database-on-planetscale/simplerestore-io-wizard.png "SimpleRestore.io")

2. Click on "Select your database backup (.tar.gz)" and select your backup archive.
3. Enter your connection string that you noted down earlier.
4. Click "Restore" and wait for the process to complete.


## (Bonus) How to Restore a PlanetScale Dump on Your Local Database

If you want to restore the dump to your local MySQL database, follow these steps:

1. Log in to your local MySQL server.
2. Create a new database or select an existing one.
3. Use the `mysql` command to restore the dump:
```bash
mysql -u username -p database_name < dump_file.sql
```
Replace `username`, `database_name`, and `dump_file.sql` with your specific details.

## FAQ

### What is a MySQL Backup Service?
A MySQL backup service is a tool or platform that allows you to create copies of your MySQL databases, ensuring data protection and recovery in case of unexpected events or data loss.

### What is a MySQL Connection String?
A MySQL connection string is a string that contains the information needed to connect to a MySQL database. It typically includes details like the host, port, username, password, and database name.

### What is a MySQL Dump?
A MySQL dump is a file that contains a SQL script with all the commands needed to recreate a database. It includes table structures and data.

### How to Restore a MySQL Backup?
To restore a MySQL backup, you need to have a dump file. You can use tools like SimpleRestore.io to easily upload and restore the backup to your desired database.

### How to Create a MySQL Backup for PlanetScale?
You can create a MySQL backup for PlanetScale using the [MyDumper tool](https://github.com/mydumper/mydumper) or by using a backup service like [SimpleBackups](https://simplebackups.com). Both methods involve generating a dump file that can be used for restoration.