Export & Import your SQL Database
Step 1: Get Database Connection Details from Pterodactyl Panel
-
Log in to Pterodactyl Panel:
- Login into your account on the panel, if you haven't
-
Access the Server’s Database:
- Go to the server where the database is allocated at.
- Find and click on the "Databases" tab in the left-side menu.
3. Copy the Connection Information:
- Here, you'll see details like the host, port, database name, username, and password for your database.
- Copy these details, as you’ll need them to connect with HeidiSQL.
Step 2: Set Up HeidiSQL
-
Open HeidiSQL:
- Launch the HeidiSQL application on your computer.
-
Create a New Session:
-
Enter Connection Details (obtained on step 2):
-
Save and Connect:
- Click on
Save
, thenOpen
to connect to the database. - If your details are correct, HeidiSQL should connect to the database successfully.
- Click on
Step 3: Export a Database in HeidiSQL
-
Select the Database:
- In HeidiSQL, select the database you want to export from the list on the left.
-
Export Database:
-
Check Exported File:
- Go to the saved location and check that the
.sql
file was created successfully.
- Go to the saved location and check that the
Step 4: Import a Database in HeidiSQL
-
Select the Target Database:
- Make sure you are connected to the server and have selected the database you want to import data into. (Step 2, but with the database you want to import data into).
-
Open SQL File:
-
Execute Import:
- The SQL commands from the file will load in the SQL Query window. Click
Run
to execute the commands, which will import the data and structure into the database.
- The SQL commands from the file will load in the SQL Query window. Click
-
Verify Import:
- Once the process completes, check the tables and data to ensure everything imported correctly.