Why am I unable to connect to MariaDB using phpMyAdmin?


Last modified date: 2023-07-28

Applicable Products

  • MariaDB 10
  • phpMyAdmin 4.9.11.0 (or earlier) on QTS 5.0.x
  • phpMyAdmin 5.2.1.0 (or earlier) on QTS 5.1.x

Root Cause

MariaDB 10 is not a built-in application; therefore, you must edit the phpMyAdmin configuration file (config.inc.php) over smb with Windows to access MariaDB 10.


Solution

  1. Log in to QTS as an administrator.
  2. Open App Center.
  3. Install phpMyAdmin and MariaDB 10.
  4. Configure MariaDB 10 settings.
    1. Open MariaDB10.
    2. Go to Account and Database.
    3. Next to Root password, click Reset.
      Note
      The application will restart after resetting the root password. Resetting the root password does not result in data loss.
  5. Configure the phpMyAdmin settings.
    1. Connect to the Web shared folder as an administrator via an SMB connection.
    2. Go to Web\phpMyAdmin\.
    3. Open the config.inc.php file using a text editor.
    4. Locate the Servers configuration section.
      /**
       * Servers configuration
       */
      $i = 0;
      
      /**
       * First server
       */
      $i++;
      /* Authentication type */
      $cfg['Servers'][$i]['auth_type'] = 'cookie';
      /* Server parameters */
      $cfg['Servers'][$i]['host'] = 'localhost';
      $cfg['Servers'][$i]['connect_type'] = 'tcp';
      $cfg['Servers'][$i]['compress'] = false;
      $cfg['Servers'][$i]['AllowNoPassword'] = false;
    5. Delete the Servers configuration script from the file.
    6. Enter the following script.
      /**
       * Servers configuration
       */
      $i = 0;
      
      /**
       * First server
       */
      $i++;
      /* Authentication type */
      $cfg['Servers'][$i]['verbose'] = 'MariaDB 5';
      $cfg['Servers'][$i]['auth_type'] = 'cookie';
      /* Server parameters */
      $cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
      $cfg['Servers'][$i]['compress'] = false;
      $cfg['Servers'][$i]['AllowNoPassword'] = false;
      
      /**
       * Second server
       */
      $i++;
      /* Authentication type */
      $cfg['Servers'][$i]['verbose'] = 'MariaDB 10';
      $cfg['Servers'][$i]['auth_type'] = 'cookie';
      /* Server parameters */
      $cfg['Servers'][$i]['socket'] = '/var/run/mariadb10.sock';
      $cfg['Servers'][$i]['compress'] = false;
      $cfg['Servers'][$i]['AllowNoPassword'] = false;
    7. Save the file.
    8. Close the phpMyAdmin app.
    9. Reopen the phpMyAdmin app.
    10. Select MariaDB 5 or MariaDB 10.
    11. Enter the username and password.
    12. Click Go.

You can now connect to MariaDB using phpMyAdmin.

Was this article helpful?

58% of people think it helps.
Thank you for your feedback.

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Choose specification

      Show more Less

      This site in other countries/regions:

      open menu
      back to top