Get Your Guide to a Modern, Well-Architected Pipeline for Database Changes
Step by step, this guide covers what every team needs to consider — from sandboxes to batching strategies and automation to measurement.
No more late-night database emergencies
Automated script validation. Forecasted future database states. Stress-free continuous deployments.
Zero downtime.
Watch a DemoYour database team is overworked & under-resourced
More changes need to be reviewed. Deployments need to get out the door faster. Recovering from backup is slow. There’s a better way.
Read the PostChange Database MySQL
Your team knows how to change database MySQL and perform basic commands:
- mysql create database
- mysql delete database
- mysql drop databases
However, database code and stored procedure code often don’t follow the same app code process at most companies. Manual DBA reviews of MySQL code can slow teams down. Liquibase helps database teams treat their database schema changes more like app code changes by making it easy to version, track and deploy these updates to MySQL and dozens of other database platforms.
Version control for your MySQL database
Liquibase enables teams to automate MySQL deployments using SQL, XML, YAML, or JSON so you can standardize the database change process across your organization. Liquibase orders the schema changes and stored procedure code in changelogs that make it easy for your team to commit them to source control for easy versioning and CI/CD automation.
Liquibase is a command-line database change and deployment tool that allows developers to execute script files against several database technologies, including MySQL, Microsoft SQL Server, MariaDB, PostgreSQL, and dozens of others. There is a free open source edition and paid Pro and Enterprise versions are also available that include support.
All MySQL database changes are specified as changesets in a Liquibase changelog file. Changesets are added to the changelog in the order you’d like them to be deployed. The Liquibase changelog tracks which developer made the change (author) along with a unique changeset ID that makes it easy and useful for tracking and auditing changes through your CI/CD pipeline.
Change MySQL in the cloud and on-premises
New and older versions of MySQL are all supported on-premises and in the cloud (Aurora MySQL and Azure MySQL). Liquibase is database and cloud agnostic. Your team can take advantage of using AWS credits to purchase Liquibase on AWS Marketplace. Your whole team will enjoy professional expert support from getting up and running to getting DevOps best practices for managing database change pipelines. Learn how to get started with database automation with Liquibase and Azure DevOps.
MySQL Tutorial Instructions
Since Liquibase runs from a shell or command line, you can run it manually or from a deployment pipeline. Liquibase tracks changes using tables to ensure consistency and to avoid corruption due to incorrectly altered changelogs. While it’s running updates, it puts a “lock” on your database so your team can’t accidentally run two changelogs concurrently.
Read the Liquibase documentation for notes about supported changes and commands for each of the supported databases. “addColumn“, for example, automatically rolls back when developers use XML, JSON, or YAML changelogs, so it’s not necessary to write a rollback, saving your development team time. You can do just about anything with the schema updates, manipulating views, stored procedures, functions, triggers, and more. Stored procedures and functions should have special treatment, however. Well take a look at those later, but first a word of caution about adding an index with these changelogs.
It’s best to keep stored procedure and function definitions under source control. The MySQL grant system controls which users can view and execute stored routines. A new feature in Liquibase 4.2 allows Liquibase Pro stored logic support for MySQL 5.7 and 8.0. Dive into what you need to know about using MySQL grants with Liquibase so your team can see the procedures, functions, triggers, views, and check constraints in the changelog.