MySQL is one of the foundations of the modern web - it is the M in the original LAMP stack (Linux, Apache, MySQL, Python/Perl/PHP) - and has evolved over the years from a simple SQL database for the web to an enterprise database solution capable of taking on mission critical tasks. The most recent versions use the InnoDB storage engine by default and include JSON document support as a native data type. Used by numerous applications as their default backend storage, MySQL is firmly established as the most popular database engine on the web.
Compose for MySQL for All is a general introduction to MySQL on Compose.
Are you wondering what you'll get, or can get, with a Compose MySQL deployment? Want to know what you'll need to do to manage it? Check out some of the implementation features and details down in MySQL for Ops and Admins.
Just deployed MySQL and want to get coding with it? Developing an application or want to try a new stack? Then see the
MySQL for Developers section for resources on how to connect from different languages, command line tools and more information to get you started.
When deployed on Compose, MySQL has comes with these standard Compose features.
- Automatically scaling server stack that scales RAM, CPU, and I/O as your MySQL data grows.
- Daily, weekly, monthly, and on-demand backups.
- Metrics displayed in the Compose UI
- Deploy, manage, backup, and otherwise automate database tasks through the The Compose API.
- Guaranteed resources per deployment.
- Daily logs available for download.
Compose deployments of MySQL also come with a few MySQL specific features:
- An optional add-on for real-time log access.
- Start with 1GB storage for $27 - as you grow each additional gigabyte costs $18.
Compose for MySQL deployments come with three data nodes and two HAProxy portals. The three data nodes have 1GB of storage and 102MB of memory. The HAProxy portals each have 64MB of memory.
Compose auto-scaling will grow your deployment size as your data grows. You may also manually scale your deployment from the Resources panel in the Compose UI. Scaling happens in 1GB storage/102MB memory units and when you scale, each data node moves up to the new resource size. The HAProxy portals can also be scaled in 64MB units. Additional HAProxy portals can be added in the Security panel in the Compose UI.
See Compose Datacenter Availability for current location availability.
Compose deployments are billed based on disk usage and your MySQL deployment usage is measured hourly. It is then grouped into a single monthly billing cycle. This means that any scaling or add-on usage will be charged from when the new resource was provisioned; not just for the month. You can see your deployment's usage in the Overview panel, under Current Usage.
Initial deployment set up is $27/month. Depending on which scaling and add-ons options you choose, the cost will increase. For example, if you wish to add extra storage and RAM, it is billed at an additional $18/month per unit of 1GB storage/102MB memory, so an additional 2GB storage/204MB memory will cost an additional $36/month.
All MySQL Deployments are high-availability clusters with 3 data nodes. MySQL clusters consist of a leader and a follower member on separate machines in separate zones. In the event of a leader member failure, we've configured automatic promotion of the current slave within 60 seconds of the leader becoming unresponsive.
Each MySQL deployment has two HAProxy portals that monitor which cluster member is the leader. You can connect to either (or architect your application to connect to either) and in the event of a leader member failure, the portals will connect to the new leader without requiring you to change your application's connection configuration.
Backups are taken using the the open-source tool Percona XtraBackup. Backups are made on running instances without having to shut down or impact any of the replica members. Each backup is usable for point-in-time recovery and of tables and data, together with the schema definitions, MyISAM tables, and other portions of the server. Your backups are available to download locally, or to restore to another Compose for MySQL deployment.
The Backups panel has all the available daily, weekly, monthly, or on-demand backups for you to restore from. It is also possible to trigger a restore operation from the Compose API. For more details see the Backups page and the Managing Backups via the Compose API page.
mysql command is used to communicate with MySQL through the command-line. It comes with a package installation of MySQL for your local system or development environment. To use the
mysql command, you will also want to make sure your connections are SSL enabled.
The Overview panel of the Compose UI provides the basic information you need to get connected to your databases. In the section Connection info you will find Credentials and Connection Strings for getting your application connected, and the Command line for you to get direct access via, well, the command-line. For more information and examples in a few languages, see the Connecting to Compose for MySQL page.
The full list of documentation for MySQL is in the side-bar, in addition to all things Compose.
For more than just help docs, check out Compose Articles and our curated collection of Compose for MySQL-related topics with more resources and how-to's for using Compose.
If this article didn't solve things, summon a human and get some help!
Updated 11 months ago