Databases
·
Nov 1, 2024
MySQL Databases are one of the many ways to store server data, commonly used by plugins.
Your Shockbyte server comes with a free MySQL database that can be used to store new or existing data. If you do not have one yet, you can create a MySQL Database by following this tutorial: Creating a MySQL Database
Before getting started with this tutorial, log into phpMyAdmin where you can manage your MySQL database by following the steps below.
Log into your server control panel. If you own more than one server, select the server on which you want to import your database into.
On the left sidebar of your control panel under Server Settings, navigate to Databases.
On the Database page, under Admin Link click on Open Database of the Database you wish to log into via phpMyAdmin.
Log into your phpMyAdmin account by entering your MySQL Username and Password then click Go.
This tutorial assumes you already have an existing exported database_name.sql file. If you do not have one yet, scroll down to the section on Exporting a MySQL Database.
Importing is a very handy way to store existing data from another server into your server's own database. The steps below will show you how to import an existing MySQL database:
On your phpMyAdmin page, select the database you want to import data into by clicking on the database name from the left sidebar.
Once you've selected the database, click Import found on the top navigation bar.
On the import page, click Choose File to browse and select the .sql
file from your computer that you would like to import, make sure you have selected SQL under the Format section and then, click Go.
If importing is successful, you will be redirected to a page with a message indicating that import was successful along with all the actions executed. You will also see your data tables shown on the left sidebar under the database name.
If you want to backup of your data or import it into another database, you may do so by exporting your MySQL database.
On your phpMyAdmin page, select the database you want to export by clicking on the database name from the left sidebar.
Once you've selected the database, click Export found on the top navigation bar.
On the Export page, make sure your Export method is set to Quick and the Format is set to SQL and click Go. This will automatically download your database into your computer.
If you are familiar with managing MySQL databases, or you only want to choose specific tables to be exported, you may select the Custom export method.
That's it! You've successfully exported your MySQL database. The exported SQL file is now ready to be imported into another database or simply be stored as a backup.
Game Experience Engineer @ Shockbyte