How to access MariaDB remotely


最后修订日期: 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

 

 

 

这篇文章有帮助吗?

谢谢您,我们已经收到您的意见。

请告诉我们如何改进这篇文章:

如果您想提供其他意见,请于下方输入。

选择规格

      显示更多 隐藏更多
      open menu
      back to top