Skip to main content
Last Reviewed: 2022-12-13

Add Your Database


Now that you've set up your Pantheon Dev environment, you need to import your database by creating a .sql dump file.

The Database import requires a single .sql dump that contains the site's content and configurations.

  1. Create a .sql dump using the mysqldump utility. To reduce the size for a faster transfer, compress the resulting archive with gzip:
  • Replace USERNAME with a MySQL user with permissions to access your site's database.

  • Replace PASSWORD with the MySQL user's password. You can also move -p to the end of the command to leave it blank if you want to be prompted for your password. This prevents your MySQL password from being visible on your terminal.

  • Replace DATABASE with the name of your site database within MySQL.

  • ~/db.sql defines the output target to a file named db.sql in your user's home directory. Adjust to match your desired location.

The resulting file will be named db.sql.gz. You can use the Pantheon Dashboard or a MySQL client to add your site's database.

  1. Navigate to the Site Dashboard and select the Dev environment.

  2. Select Database / Files.

  3. Click Import and add your archive (based on file size):