Guides and tutorials

Hundreds of tutorials and step by step guides carefully written by our support team.

How to create a MySQL or MariaDB database

A database is a set of data belonging to the same context and systematically stored for later use.

Any website that contains data that can be consulted through a search tool on the website itself or that allows data to be entered through a text form needs a database to store, sort and index this information.

All content management systems or CMS (Content Management System), such as WordPress, Prestashop, Magento, Joomla,... use a database to store and sort all the data contained on the web, as well as their access credentials, themes, plugins...

For this reason, all SW Hosting hosting services, either on a shared server or on their own Cloud server, have the possibility of creating databases for the web pages.

Although there are different types of databases depending on their architecture, programming language, specific use, operating system on which they are installed, etc.... the most common ones for use in web sites are MySQL and Maria DB. In this manual we will explain how to create a database for hosting services based on Linux or Windows and that have the possibility of creating a MySQL/MariaDB database.

To create a database for your website from the SWPanel you must first create a PHP Hosting service or a Linux Domain in Cloud. The creation of these types of hosting services for your website are explained in the specific manuals "Create Hosting Service"

1. Once you have created the hosting for your web site you must indicate the service on which you want to create your database. To do this you can use the search window located at the top of the SWPanel. Once located, click on its name to access its Dashboard.

enter image description here

2. When you are already in the Dashboard of the service, click on the left side menu on the option Database Management:

enter image description here

3. Then click on the Create DB or Create your first MariaDB DB button:

enter image description here

In compliance with ISO 27001 regulations on information security, the password will only be visible at the time of its creation. Subsequently the password will not be visible and can only be modified.

4. In the following window you will have to indicate the following data:

  • The name of the database.
  • The database server.
  • The name of the new database user to create.
  • The IP from the host (Here you can specify the IP that can establish connection to the database, if we leave it blank by default it will assign "%" giving access to any IP to connect to the database).
  • The access password for the database.

The two configurable options concerning the user's permissions on the database are the following:

  • User with read-only access to the Database -> The user will only be able to read the can only read the content, but not modify, delete or create data or tables. data or tables.

  • User with control over the database -> The user will be able to read, modify, delete or create data or tables.

    To finish the creation of the database and the assignment of the user with the corresponding permissions, click on the Create MariaDB button.

    enter image description here

Once you have created the database, you will have different options at your disposal:

  • Modify MariaDB
  • Open PhpMyAdmin
  • Open Post it notes
  • Delete MariaDB database