Many games for your gameserver use databases to store long-term data and function properly. Some games, resources, or mods provide you with a .sql file that you can use to import the corresponding tables and data into your own database. Exporting your database is also useful for transferring data between systems or simply creating manual backups of your files. In this guide, we'll show you how to import SQL files into your gameserver database or export them from it using the phpMyAdmin interface.
First, you need to access your gameserver's MySQL database, which you can do directly through the web interface. You should also have the .sql file(s) you want to import ready.
Some SQL files require a specific database name. This can conflict with the automatically assigned ZAP ID database name and cause errors.
You can identify these files by searching for USE xxx or CREATE DATABASE in a text editor. If you find either command, remove it and save the file before importing it.
In the Databases tab of your gameserver, click the blue link button to open the phpMyAdmin interface. Sign in with the credentials shown on your web interface page.
For more information about phpMyAdmin, see our database access guide, which explains the interface in detail.
After signing in to phpMyAdmin, select the main database, which should be your ZAP ID. You'll find the Import section in the navigation bar at the top.
On this page, click the Browse... button to open the file explorer. Find the SQL file you want to import and open it.
The maximum file size for your SQL file is 2 MB. If your file is larger, we recommend using an SQL splitter such as the Pinetools SQL Splitter to divide it into smaller parts. You can then import each part separately.
You can adjust additional settings if needed. The default settings are sufficient for most users, so just scroll down and click the Import button.
The SQL file will now be imported, and you should see the changes in the database—for example, new tables, data, and more.
Exporting your database is also very useful, for example, for easily transferring data or creating backups. Select the main database (your ZAP ID) again and click the Export section at the top.
By default, the Quick export method is selected, which automatically exports all tables and data. If you want to choose exactly which tables and data to export, select Custom and adjust the options as needed. When everything is ready, click Export to save the SQL file to your local system.
