Friday, June 30, 2017

Create MySQL Instance on MySQL Cloud Service

6:15 AM Posted by Dilli Raj Maharjan , No comments




Open Browser and Type URL: https://cloud.oracle.com. Once the page is opened click on Sign In.



 Once Click on Sign In. Following is the landing page. Select the Data Center.


Select appropriate Data Center and click on My Service.



Type the Identity Domain and Click on Go.


Type the username and password and Click on Sign In.


Once you login to Oracle Public Cloud Click on Create Instance on the dashboard.



The Create Instance window will be displayed. Click on MySQL Cloud Service.



Welcome screen will be appeared. You have option to Watch MySQL instance related videos by Clicking Watch Video or Click on Go to Console button for console.



Since I have not created any MySQL instances, there is no MySQL Instance. On Console Window, Click on Create Service to Create MySQL Instance Service.


Choose Appropriate Service Name, Description, Region and Metering Frequency and Click on Next.



On Detail configuration page, provide details as the Compute Shape, SSH Key, Size, root Credentials.




If we choose to configure MySQL Enterprise Monitor option to Yes, then Following details need to be provided: Manager User, Password, Agent user, Agent Password.  In my case I have disabled this option.


Similarly Backup destination can be defined as Both Cloud and Disk Storage. For Cloud we need to provide the container ID and its credential. I have disabled this option too.

Confirmation Page will be appeared before the database creation. Click on Create to start MySQL Instance creation.


Instance Creation on progress

Click on Instance name to view the Service Details.

Once MySQL service is created, we can login to the instance as user opc using ssh.


Once Instance is created we need to create Access Rules so that MySQL Database service can be used publicly. Click on the Menu icon and Click on Access Rules.






On Access Rules page, Click on Action menu on the right of the rule. In following snapshot, Rule ora_p2admin_mysql is disabled, that means MySQL Database hosted on this instance cannot be accessed from public network.



Since the rule is disabled, we cannot connect MySQL database instance from public network. I try to connect from my ec2 instance but failed.


Once you click on the menu of the rule, Click on Enable to enable the rule.

Enable Access Rule pop up window will be displayed for confirmation. Click on Enable to enable the Access rule.



Now we can notice the Access rule has been enabled. 



We can connect MySQL instance from the public network, create table and insert data.




If we need to connect MySQL database locally we need to install MySQL Client. Use yum install mysql to install MySQL client.