How to connect and configure a database for the site

One of the most important components of the site is the database. You can use one of the popular versions of the DBMS (database management systems) for the site on PHP hosting in RealHOST:

  • MySQL 5.5
  • MariaDB 10.1
  • MySQL 5.7
  • MySQL 8.0

In this article, we will look at creating a database and connecting it to the site using the example of the popular CMS WordPress.

Settings should be done in the PHP hosting control panel https://cloud.realhost.pro

1. First, let's determine which version of the DBMS is required for our site

Following the information on the website https://wordpress.org/about/requirements/

how-to-connect-and-configure-database-for-site.7

we will install the MariaDB 10.1 database

2. Go to Dashboard - Databases and click Add button

how-to-connect-and-configure-database-for-site.10

3. Fill out the form as described in the screenshot

how-to-connect-and-configure-database-for-site.12

  • The database user password should be as complex as possible and protected from the possibility of brute force or brute force in a dictionary.

4. In the list, the base contains the address that should be entered in the site settings

how-to-connect-and-configure-database-for-site.15

5. Open the site configuration file editor

how-to-connect-and-configure-database-for-site.17

6. Enter the database access data and save the file

how-to-connect-and-configure-database-for-site.19