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

 

 

 

這篇文章有幫助嗎?

49% 的人認為有幫助。
謝謝您,我們已經收到您的意見。

請告訴我們如何改進這篇文章:

如果您想提供其他意見,請於下方輸入。

選擇規格

      顯示更多 隱藏更多

      選擇其他偏好的語言:

      back to top