How to access MariaDB remotely
Applicable Products:
- MariaDB
- QTS 5.0 (or later)
MariaDB 5
Using QTS to setup MariaDB 5
Log in to QTS as an administrator
Open the App Center
Install and Open MariaDB 5
Finish the MariaDB 5 Setup Wizard
- Click Start
- Choose "Create a new database" and Click next
- Insert Root Password (For example: youPassWot)
- Enable TCP/IP networking
- (Optional) Change the Port number
Note: The default Port number of MariaDB 5 is 3306. - Click Apply.
Using SSH to allow remotely connecting
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 3306In 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;- Done
Try Connecting the MariaDB server remotely using MySQL Workbench
MariaDB 10
Using QTS to setup MariaDB 10
Log in to QTS as an administrator
Open the App Center
Install and Open MariaDB10
Finish the MariaDB 10 Setup Wizard
- Click Start
- Choose "Create a new database" and Click next
- Insert Root Password (For example: youPassWot)
- Enable TCP/IP networking
- (Optional) Change the Port number
Note: The default Port number of MariaDB 10 is 3307. - Click Apply.
Using SSH to allow remotely connecting
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 3307In 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;- Done
Try Connecting the MariaDB server remotely using MySQL Workbench