logo
icon

MySQL

An open-source relational database management system.

template cover
Deployed2390 times
Publisheryuaanlin
Created2024-01-23
Services
service icon

An open-source relational database management system.

Environment Variables

When you deploy the MySQL service, Zeabur will automatically inject the relevant environment variables into other services.

  • MYSQL_HOST: The hostname of the MySQL service.
  • MYSQL_PORT: The port of the MySQL service.
  • MYSQL_USERNAME: The username for the MySQL service.
  • MYSQL_PASSWORD: The password for the MySQL service.
  • MYSQL_DATABASE: The default database name for the MySQL service.
  • MYSQL_URI or MYSQL_CONNECTION_STRING: The connection string for the MySQL service.

Restoring the Backup

Zeabur offers an automatic backup feature for MySQL. However, you must restore the backup manually. Follow the steps below to restore your backup:

  1. Download and extract the backup file from the storage. You will find a data.sql file.
  2. Locate the "Command to connect to your MySQL" in the "Instructions" section of your MySQL service.
  3. Ensure you have installed the MySQL command tools on your machine. Then, run:
<Command to connect to your MySQL> < data.sql