If this document does not correspond to your current software version, you can go to Download Center to find other available document versions.

QNAP

QuTS hero 5.0.x

Download (PDF)

Configuring the MariaDB Database

Important:
  • If the SQL server was enabled in QTS 4.5.4 (or earlier) before you updated to QTS 5.0.0 (or later), after the update the system will have automatically downloaded and installed the MariaDB 5 app and migrated the SQL server data to MariaDB.

  • You can install either the MariaDB 5 or MariaDB 10 app. If you install both app versions on your NAS, MariaDB 5 will be set as the default database server.

You can configure the MariaDB database using the following methods during setup:

Methods

Description

Creating a MariaDB database

Create a new MariaDB version 5 or Maria DB version 10 database by configuring the TCP/IP network configurations and database password.

For details, see Creating a MariaDB Database.

Restoring a MariaDB Database

Restore an existing MariaDB version 5 or MariaDB version 10 database by configuring the TCP/IP network configurations.

For details, see Restoring a MariaDB Database.

Migrating a MariaDB 5 Database to MariaDB 10

If the MariaDB 10 app is installed on your NAS, you can migrate an existing MariaDB version 5 database to a MariaDB version 10 database.

For details, see Migrating a MariaDB 5 Database to MariaDB 10.

Creating a MariaDB Database

Warning:

Creating a new MariaDB database will overwrite an existing MariaDB database.

  1. Log on to QuTS hero as administrator.
  2. Go to Control Panel > Applications > MariaDB.

    The MariaDB Setup Wizard window opens.

    Note:

    The MariaDB setup wizard only appears during app initialization. To configure more advanced database features and settings, use the php.ini maintenance file.

  3. Click Start.

    The Database Actions screen appears.

  4. Select Create a new database.
  5. Click Next.

    The Default Instance Properties screen appears.

  6. Specify a root password.
    Important:
    • The password must contain 8 to 64 bytes of UTF-8 characters.

    • The password cannot be "admin" or blank.

    • If the system detects a weak password, the MariaDB server will be automatically disabled until a stronger password is configured.

  7. Confirm the password.
  8. Optional: Enable TCP/IP networking.
    1. Select Enable TCP/IP networking.
    2. Specify the port number.
      Tip:
      • MariaDB 5: The default port number is 3306.

      • MariaDB 10: The default port number is 3307.

  9. Click Apply.

    QuTS hero creates the MariaDB database. The Finish screen appears.

    Note:

    It may take a few minutes for the system to set up the database.

  10. Click Finish.

    QuTS hero enables the MariaDB server.

Restoring a MariaDB Database

  1. Log on to QuTS hero as administrator.
  2. Go to Control Panel > Applications > MariaDB.

    The MariaDB Setup Wizard window opens.

    Note:

    The MariaDB setup wizard only appears during app initialization. To configure more advanced database features and settings, use the php.ini maintenance file.

  3. Click Start.

    The Database Actions screen appears.

  4. Select Restore an existing database.
  5. Click Next.

    The Default Instance Properties screen appears.

  6. Optional: Configure TCP/IP networking.
    1. Select Enable TCP/IP networking.
      Note:

      This option is enabled by default.

    2. Specify the port number for TCP/IP networking.
      Note:

      The default port is 3307.

  7. Click Apply.

    QuTS hero restores the MariaDB database. The Finish screen appears.

    Note:

    It may take a few minutes for the system to restore the database.

  8. Click Finish.

    QuTS hero enables the MariaDB server.

Migrating a MariaDB 5 Database to MariaDB 10

This feature is only available in the MariaDB 10 app.

  1. Log on to QuTS hero as administrator.
  2. Install the MariaDB 10 app.
    Note:

    For details, see Installing an App from App Center.

  3. Open the MariaDB 10 app.

    The MariaDB Setup Wizard window opens.

    Note:

    The MariaDB setup wizard only appears during app initialization. To configure more advanced database features and settings, edit the php.ini maintenance file. For details, see Modifying the php.ini Maintenance File.

  4. Click Start.

    The Database Actions screen appears.

  5. Select Migrate a MariaDB 5 to a MariaDB 10 database.
  6. Click Next.

    The Default Instance Properties screen appears.

  7. Optional: Configure TCP/IP networking.
    1. Select Enable TCP/IP networking.
      Note:

      This option is enabled by default.

    2. Specify the TCP/IP networking port.
      Note:

      The default port is 3307.

  8. Click Apply.

    QuTS hero migrates the existing MariaDB 5 database to MariaDB 10. The Finish screen appears.

    Note:

    The data migration may take a few minutes to complete.

  9. Click Finish.

    QuTS hero enables the MariaDB server.