Skip to content

ksoichiro/mariadb-spring-test

Repository files navigation

mariadb-spring-test

A tiny application powered by Spring Boot to test MariaDB.

Vagrant VMs

Contents

  • Ubuntu 12.04 Precise 64bit
  • MariaDB 10.1 (Galera Cluster)

VM operations

There are three VM configurations: g1, g2, g3.
Each one is a master node of Galera Cluster.

Setup

  1. vagrant up g1 g2 g3
  2. Login to g1 by vagrant ssh g1
  3. Copy content of /etc/mysql/debian.cnf in g1
  4. Login to g2 by vagrant ssh g2
  5. Replace content of /etc/mysql/debian.cnf with copied debian.cnf from g1
  6. Do same things in g3
  7. Restart hosts
    • On g1, MariaDB should start with service mysql start --wsrep-new-cluster

Other operations

# launch
vagrant up g1
# login to g1 VM
vagrant ssh g1
# stop g1 VM
vagrant halt g1

MariaDB service operations

Execute as root user(sudo su - from vagrant user):

# start
service mysql start
# stop
service mysql stop
# show cluster status
mysql -uroot -ptest -e"show status like 'wsrep_%'"
# check query log
tail -f /var/log/mysql/mysql.log

App

To run, execute with Gradle wrapper:

./gradlew bootRun

You can configure JDBC connection with src/main/resources/application.yml.

License

Copyright © 2015 Soichiro Kashima.

Licensed under MIT License.
See the bundled LICENSE file for details.

About

A tiny application powered by Spring Boot to test MariaDB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published