Connect Liquibase with MariaDB on AWS RDS
Last updated: September 2, 2025
MariaDB delivers operational agility with key enterprise features, including real ACID compliance and full SQL. It provides two solutions:
MariaDB Platform, which includes an open-source database solution—MariaDB Server along with ColumnStore and MaxScale. Note: MariaDB Xpand is not currently supported.
MariaDB Cloud (or MariaDB SkySQL), which is a cloud database service (DBaaS) that delivers MariaDB Platform on the expert-maintained cloud infrastructure from MariaDB Corporation. You can also use MariaDB on Amazon RDS. For more information about MariaDB, see the MariaDB Knowledge Base.
Verified database versions
11.4 (LTS)
10.6 (LTS)
Before you begin
Ensure you have Java installed. Liquibase requires Java to run. If you used the Liquibase Installer, Java is included automatically. Otherwise, you must install Java manually.
Procedure
(Maven users only) Configure Maven
If you're running Liquibase using the Maven plugin using mvn liquibase:update installing the extension with Maven ensures the right files are available and everything works together automatically. You can manage these extensions by adding them as dependencies in your project’s pom.xml file. When configured this way, Maven automatically downloads the specified JAR files from Maven Central during the build process.
Configure your connection
1. Check the connection by using the mysql
utility and running the following:
mysql -h <endpoint> -P 3306 -u <mymainuser> -p
Note: The alternative way is to connect with the SSL certificate.
You can find the connection information in the AWS Management Console:
Open the Amazon RDS console
Select Databases and choose the needed database
Select Connectivity & security. You will see all information under Endpoint & Port.
To find the connection information using the AWS CLI and RDS API, refer to the Connecting to a DB instance running the MariaDB database engine documentation.
2. Specify the database URL in the Liquibase properties file, as follows:
url: jdbc:mariadb://<endpoint>:<port>/<dbname>
Example: url:jdbc:mariadb://myrds.cz1j1vh9uvuo.us-east-1.rds.amazonaws.com:3306/mydatabase
Test your connection
1. Create a text file called changelog
(.sql
, .yaml
, .json
, or .xml
) in your project directory and add a changeset.
If you already created a changelog using the init project
command, you can use that instead of creating a new file. When adding onto an existing changelog, be sure to only add the changeset and to not duplicate the changelog header.
2. Navigate to your project folder in the CLI and run the Liquibase status
command to see whether the connection is successful:
liquibase status --username=test --password=test --changelog-file=<changelog.xml>
Note: You can specify arguments in the CLI or keep them in the Liquibase properties file.
If your connection is successful, you'll see a message like this:
4 changesets have not been applied to <your_connection_url>
Liquibase command 'status' was executed successfully.
3. Inspect the deployment SQL with the update-sql
command
liquibase update-sql --changelog-file=<changelog.xml>
If the SQL that Liquibase generates isn't what you expect, you should review your changelog file and make any necessary adjustments.
4. Then execute these changes to your database with the update
command:
liquibase update --changelog-file=<changelog.xml>
If your update
is successful, Liquibase runs each changeset and displays a summary message ending with:
Liquibase: Update has been successful.
Liquibase command 'update' was executed successfully.
5. From a database UI tool, ensure that your database contains the test_table
object you added along with the DATABASECHANGELOG table and DATABASECHANGELOGLOCK table.