Available in VPC
You can use MySQL Workbench or phpMyAdmin, a MySQL client, to access MySQL Server from outside the NAVER Cloud Platform, and perform various DB-related tasks conveniently on the client.
Access through MySQL Workbench
You can use Workbench, a MySQL client, to access MySQL Server from outside the NAVER Cloud Platform, and perform tasks. To access MySQL Server through MySQL Workbench, you must first set up the NAVER Cloud SSL VPN or a public domain of MySQL Server.
Access through SSL VPN
You can access through MySQL Workbench after signing up and configuring the NAVER Cloud SSL VPN. SSL VPN provides a private network in which access in protected through SSL encryption. It restricts access to the private network to only allowed users by setting up routing and ACG, which makes server access and use more secure.
The following describes how to connect MySQL Server through MySQL Workbench after setting up SSL VPN:
Additional fees apply when you subscribe to SSL VPN. For more information on SSL VPN and its pricing plans, see Services > Security > SSL VPN on the NAVER Cloud Platform portal.
- Access the SSL VPN after completing the subscription and settings by referring to the SSL VPN user guide.
- In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Cloud DB for MySQL. - Click the DB Server menu.
- Select the MySQL server to access, and set ACG by referring to Set ACG.
- Access source: IP Pool of SSL VPN.
- Allowed port (service): Access port of MySQL Server to connect to.
- Click Manage DB > Manage DB user, in order, and add an user to connect through SSL VPN.
- Download MySQL Workbench and follow the guide to install it.
- Run MySQL Workbench, and create a new MySQL Connection as follows:
- Connection Method: Standard (TCP/IP)
- Parameters tab
- Hostname: Private domain of the MySQL Server to connect to.
- Port: Access port of the MySQL Server to connect to.
- Username: Account name of the MySQL Server to connect to.
- Click the created MySQL Connection to access the MySQL Server.
Access through public domain
You can access the server through MySQL Workbench after setting a public domain on MySQL Server.
The following describes how to connect MySQL Server through MySQL Workbench after setting up a public domain:
Public domains can only be applied for on the DB server created in the public subnet.
Through the public domain, the data communicated from the outside is charged based on network usage.
- In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Cloud DB for MySQL. - Click the DB Server menu.
- Select the MySQL Server to set the public domain, click Manage DB > Manage public domain, in order, and click [Yes] on the settings popup window.
- Set ACG of the selected MySQL Server by referring to Set ACG.
- Click Manage DB > Manage DB user, in order, and add an user to connect through the public domain.
- Download MySQL Workbench and follow the guide to install it.
- Run MySQL Workbench, and create a new MySQL Connection as follows:
- Connection Method: Standard (TCP/IP)
- Parameters tab
- Hostname: Public domain of the MySQL Server to connect to.
- Port: Access port of the MySQL Server to connect to.
- Username: Account name of the MySQL Server to connect to.
- Click the created MySQL Connection to access the MySQL Server.
Access through phpMyAdmin
You can access MySQL Server from a web browser with phpMyAdmin, a php-based MySQL client, and perform various tasks such as editing DB, executing SQL status, managing user and permissions, and so on.
The following describes how to install phpMyAdmin from the application server, and access MySQL Server through phpMyAdmin in a web browser. The description is based on CentOS 7.0 application servers.
- Access the application server using the root account.
- Run the following command to install the Apache, PHP, and MySQL libraries on the application server:
# yum -y install httpd php mysql php-mysql- After completing installation, check if the connection to the MySQL Server is successful.
- Run the following command to install the EPEL package for
yumautomatic updates:# yum -y install epel-release - Run the following command to restart the server:
# systemctl restart httpd- After starting the service, access 'http://(server public IP address)' in a web browser, and check if the Apache server is working properly.
- If you cannot access, allow the 80 port in the ACG. For more information on how to set ACG, see Set ACG.
- After starting the service, access 'http://(server public IP address)' in a web browser, and check if the Apache server is working properly.
- Access the application server with the root account, run the following commands to install the phpMyAdmin package:
# yum install phpMyAdmin - Run the following command to reload (
reload) Apache:# systemctl reload httpd - Run the following command in order to set IP to allow access to
phpMyAdmin.conf:# cd /etc/httpd/conf.d # cp -a phpMyAdmin.conf phpMyAdmin.conf.origin # vi phpMyAdmin.conf <Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require ip 127.0.0.1 # change the IP to allow access Require ip ::1 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 # change the IP to allow access Allow from ::1 </IfModule> </Directory> <Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require ip 127.0.0.1 # change the IP to allow access Require ip ::1 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 # change the IP to allow access Allow from ::1 </IfModule> </Directory> - Run the following commands in order, to reload (
reload) Apache:# cd ~ # systemctl reload httpd- After reloading, access 'http://server public IP/phpMyAdmin' in a web browser, and check if the phpMyAdmin interface is working properly. If the connection is not successful, check the server ACG settings and
phpMyAdmin.confsettings.
- After reloading, access 'http://server public IP/phpMyAdmin' in a web browser, and check if the phpMyAdmin interface is working properly. If the connection is not successful, check the server ACG settings and
- Run the following commands in order, to specify the phpMyAdmin access settings:
# cd /etc/phpMyAdmin # vi config.inc.php $cfg['Servers'][$i]['host'] = 'Private domain of MySQL Server to connect to'; // MySQL hostname or IP address $cfg['Servers'][$i]['port'] = 'access port of MySQL Server to connect to'; // MySQL port - leave blank for default port -- Examples $cfg['Servers'][$i]['host'] = 'db-d3oh.beta-cdb.ntruss.com'; // MySQL hostname or IP address $cfg['Servers'][$i]['port'] = '3306'; // MySQL port - leave blank for default port - Access 'http://server public IP/phpMyAdmin' in a web browser, and log in to the user account of the MySQL Server you have connected to.