Skip to content

Gameserver: Import or Export an SQL File

Learn how to manage your gameserver database efficiently by importing and exporting SQL files with phpMyAdmin

12 November 20262 min read35 Views0 helpful

Introduction

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.

Preparation

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.

Tip

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.

Import an SQL File

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.

Info

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.

Export an SQL File

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.

Conclusion

You have successfully exported your database to an SQL file, so you can easily import it again in the future. If you have any questions or need help, our support team is here for you every day! 🙂

FAQ

Frequently asked questions

Use the phpMyAdmin interface, which you can open by clicking the blue link button in the Databases tab of your gameserver.
The maximum file size is 2 MB. If your file is larger, use an SQL splitter such as the Pinetools SQL Splitter to divide it into smaller parts, then import each part separately.
Look for USE xxx or CREATE DATABASE in the file. These commands can conflict with the automatically assigned ZAP ID database name, so remove them and save the file before importing it.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.