How to access MariaDB remotely


Laatst gewijzigd op: 2022-07-12
Applicable Products:
  • MariaDB
  • QTS 5.0 (or later)
  • MariaDB 5

    1. Using QTS to setup MariaDB 5

      1. Log in to QTS as an administrator

      2. Open the App Center

      3. Install and Open MariaDB 5

      4. Finish the MariaDB 5 Setup Wizard

        1. Click Start
        2. Choose "Create a new database" and Click next
        3. Insert Root Password (For example: youPassWot)
        4. Enable TCP/IP networking
        5. (Optional) Change the Port number
          Note: The default Port number of MariaDB 5 is 3306.
        6. Click Apply.
    2. Using SSH to allow remotely connecting

      1. SSH access the NAS

      2. Use the command to enter MariaDB monitor locally
        Note: Specify the port number after -P (for example: -P 3306)
        /usr/local/mysql/bin/mysql -u root -p -h localhost -P 3306

      3. In the MariaDB monitor, use the following command to grant the permission for remotely access.
        Note: Modify youPassWot to your Root Password
        GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youPassWot';FLUSH PRIVILEGES; 

      4. Done
    3. Try Connecting the MariaDB server remotely using MySQL Workbench

  • MariaDB 10

    1. Using QTS to setup MariaDB 10

      1. Log in to QTS as an administrator

      2. Open the App Center

      3. Install and Open MariaDB10

      4. Finish the MariaDB 10 Setup Wizard

        1. Click Start
        2. Choose "Create a new database" and Click next
        3. Insert Root Password (For example: youPassWot)
        4. Enable TCP/IP networking
        5. (Optional) Change the Port number
          Note: The default Port number of MariaDB 10 is 3307. 
        6. Click Apply.
    2. Using SSH to allow remotely connecting

      1. SSH access the NAS

      2. Use the command to enter MariaDB monitor locally
        Note: Specify the port number after -P (for example: -P 3307)
        `getcfg MariaDB10 Install_Path -f /etc/config/qpkg.conf`/bin/mysql -u root -p  -h localhost -S /var/run/mariadb10.sock -P 3307

      3. In the MariaDB monitor, use the following command to grant the permission for remotely access.
        Note: Modify youPassWot to your Root Password
        GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youPassWot';FLUSH PRIVILEGES; 

      4. Done
    3. Try Connecting the MariaDB server remotely using MySQL Workbench

 

 

 

Was dit artikel nuttig?

49% van de mensen vond dit nuttig
Bedankt voor uw feedback.

Vertel ons a.u.b. hoe we dit artikel kunnen verbeteren.

Hieronder kunt u eventuele aanvullende feedback toevoegen.

Kies specificatie

      Toon meer Minder

      Deze website in andere landen/regio's:

      open menu
      back to top