MySQL is still the most popular open-source and developer database in the market according to DB Engines.
MySQL Database Service is the same MySQL you have always known and used, except it is available in the cloud as a fully-managed service running on Oracle Cloud Infrastructure (OCI).
In this blog, I am going to cover a brief overview of MySQL Database service, key use cases, how to create & connect to a MySQL DB system, and the recently announced MySQL Database Service Analytics Engine.
- MySQL Database Service
- Key Use Cases of MDS
- Create & Connect to MySQL DB system
- MySQL Database Service Analytics Engine
- Migration from Amazon RDS, Microsoft Azure, Google Cloud SQL, On-premise
- High Availability for MDS
If you are a beginner and want to know more about Databases in Oracle Cloud, check out our blog Databases In Oracle Cloud (OCI) – VMDB | BMDB | ExadataCS
MySQL Database Service
Oracle MySQL Database Service (MDS) is a fully managed MySQL Database as a Service (DBaaS) offering in Oracle Cloud Infrastructure (OCI). It automatically runs the latest version of MySQL (8.0.22) with the latest improvements and bug fixes.
It automates time-consuming tasks that normally a DBA would need to take care of such as MySQL instances provisioning, patches and upgrades, and backups and restores. Users can easily scale MySQL, monitor cloud resources, and implement security best practices to meet regulatory requirements.
Key Use cases of MySQL Database Service
Following are the key use cases of MySQL Database Service:
1) New Cloud-Native Apps
- Develop applications that are built in the cloud, for the cloud
- Spin up new MySQL instances in minutes
- More focus on the development
- Use open-source and cloud-native services
2) Move Existing Workloads
- Move existing on-prem workloads to the cloud
- Support for both Hybrid cloud and on-premises
- Improved security and expert technical support available
- Latest updates, security fixes, and features available
- Improves productivity and accelerates innovation
3) Real-time Analytics
- Handle complex analytical queries
- Support real-time decision making
- OLTP and OLAP in MySQL
- Eliminates ETL (Extract, transform & load)
4) SaaS Applications
- Popular with ISVs
- ISVs can scale their SaaS applications globally
- Focus on rapidly adding new features
- OCI performance, availability, and manageability SLAs
Create & Connect to MySQL DB System
Let’s see how we can set up a MySQL DB system within a few steps.
1) Open the navigation menu, under Database, click on MySQL -> DB System.
2) On DB System page, click on Create MySQL DB System.
3) On the Create DB system page, enter the required details, and submit.
4) The new MySQL DB System will be ready to use after a few minutes. Note the MySQL endpoint (Address) of the DB system.
5) It is not possible to connect directly to the MySQL DB System endpoint. You must create a Compute instance first and then connect from the Compute Instance to the MySQL DB System.
6) You will need a MySQL client tool to connect to your new MySQL DB System from your Compute instance.
- First, install the MySQL release package on your compute instance
- Then, install MySQL Shell
sudo yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm sudo yum install –y mysql-shell
7) Use the following command to connect to MySQL using the MySQL Shell client tool.
mysqlsh -u<MDS_admin_username> -p -h<MDS_endpoint>
(Example mysqlsh -uadmin -p -h132.145.170.990)
MySQL Database Service Analytics Engine
MySQL Database Service Analytics Engine allows you to run both online transaction processing (OLTP) and online analytics processing (OLAP) workloads in the MySQL Database Service. Let’s understand what was the problem we were facing before the analytics engine came into the picture.
MySQL is optimized for OLTP workloads, but it is not designed for analytic processing. When organizations need to run their analytical queries on data stored in MySQL database, they have to move their data to another database specialized for analytic applications. This approach of moving data to another database introduces complexity and additional cost of ETL (extract, transform, load).
MySQL Analytics Service is designed in such a way that both OLTP and OLAP applications can be run with MySQL Database Service with Analytics Engine without the need for ETL. Existing applications don’t require any changes. You simply add an analytics cluster to your existing cloud MySQL environment, load your tables, and then query the analytics cluster through your MySQL instance.
Enable Analytics against On-premise MySQL Databases
For on-premise customers who cannot move their MySQL deployment to a Cloud environment because of compliance or regulatory requirements, can still leverage MySQL Analytics by using the hybrid deployment model using inbound replication. With this, the on-premise data can be replicated to MySQL Database in the cloud and once the replication is done, you can start the MySQL analytics engine to run analytical queries.
Migration from Amazon RDS, Microsoft Azure, Google Cloud SQL, On-premise
Oracle Cloud supports migration from any MySQL source such as Amazon RDS, Azure SQL, Google Cloud SQL, or on-premise SQL to Mysql Database Service in Oracle Cloud. It is a very simple and automated process of moving data from any cloud vendor into Oracle MySQL Database service using MySQL shell.
The below image shows a use case scenario for migration from Amazon RDS, however, it works almost the same for other scenarios. The best solution to migrate from Amazon RDS is MySQL Shell Dump & Load utility. Let’s see how this works.
You will first install MySQL shell utility on Amazon RDS instance and run the Mysql shell dump command to push the dump files(data) from RDS to Oracle cloud (say OCI object storage). On the other side, you will run the MySQL shell dump load command to load the dump files(data) from the object storage to the Oracle MySQL Database instance.
If you want to know more about migration, check out our blog Oracle Database Migration To Cloud (Lift & Shift)
High Availability through Group Replication
Oracle is about to offer high availability in MySQL Database Service based on Group replication and InnoDB clusters. This is a feature expected to be released in early 2021. This will work by creating a cluster of MySQL servers in the Oracle cloud, spread out across multiple fault domains and availability domains. This will ensure zero data loss in case of failure (RPO=0) and fast fail-over (RTO=1 min)
Related/References
- Oracle Cloud Database Deployment Options (VMDB, BMDB, ExaCC, ExaCS & Autonomous (ADW, ATP)
- How To Create Database on Oracle’s Gen2 Cloud (OCI)
- Overview of Autonomous Databases – Oracle Serverless Database
- [New Update] Oracle Database 21c Now Available On Oracle Cloud (OCI)
- [1Z0-1044] Oracle Cloud Platform Data Management 2020 Associate
Next Task For You
We cover MySQL Database Cloud Service in our DBA To Cloud DBA training along with Database cloud service (VMDB, BMDB), Autonomous databases, database administration tasks such as start/stop, scale, backup, restore, patching, and migration including the hands-on labs you must perform to clear [1Z0-1044] Oracle Cloud Platform Data Management 2020 Associate Certification.
Begin your journey towards becoming a Cloud DBA Expert by joining the FREE MasterClass.
Click on the below image to Register for the FREE Class Now!
The post MySQL Database Service In Oracle Cloud appeared first on Cloud Training Program.