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% の人が、これは役に立つと思っています。
ご意見をいただき、ありがとうございます。

この記事の改善箇所をお知らせください。

その他のフィードバックがある場合は、以下に入力してください。

仕様を選択

      もっと見る 閉じる

      当ページを他の国/地域で見る:

      気軽にお問い合わせ! show inquiry button
      open menu
      back to top