MySQL Database Setup
Feature
Germain supports MySQL as its datastore, providing users with a reliable and scalable solution for managing their data. In particular, MySQL Cluster is a powerful option that addresses the challenges of modern web, cloud, and communications services. MySQL Cluster offers the following benefits:
Scalability: MySQL Cluster allows you to scale your database horizontally by distributing the data across multiple nodes. This enables you to handle increasing data volumes and user traffic while maintaining high performance.
High Availability: With MySQL Cluster, your data is automatically replicated across multiple nodes, ensuring that it remains available even in the event of node failures. This high availability feature minimizes downtime and provides continuous access to your data.
Performance: MySQL Cluster is designed for high-performance applications. It leverages in-memory storage and parallel processing to deliver fast response times, making it suitable for demanding workloads and real-time applications.
Fault Tolerance: MySQL Cluster provides built-in fault tolerance mechanisms to protect your data. It can automatically detect and recover from node failures, ensuring data integrity and minimizing the impact on your applications.
Flexibility: MySQL Cluster supports a wide range of data types and indexing options, allowing you to model and query your data in a way that suits your application requirements. It also supports SQL, making it compatible with existing applications and tools.
By choosing MySQL Cluster as the datastore for Germain, you can leverage its capabilities to handle large amounts of data, deliver high availability, ensure performance, and achieve fault tolerance. This enables you to build robust and scalable applications that meet the needs of your business.
Deployment
Use version 5.7 or higher.
Linux
sudo apt update
sudo apt install mysql-server
sudo systemctl status mysql
If a specific version needs to be installed download .deb package from https://downloads.mysql.com/archives/community/
Then run
dpkg -i <package_name>
It should show the status as running. Then you can connect to MySQL from command line using mysql -u root
(password root)
Centos/RHEL
sudo yum update
sudo yum install wget
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
sudo yum install mysql-server
sudo systemctl start mysqld
It should show the status as running. Then you can connect to MySQL from command line using mysql -u root
(password root)
Windows
Download MySQL Installer from https://dev.mysql.com/downloads/installer/ and execute it
Choose the appropriate setup type (typically Developer Default) to install MySQL server and choose MySQL Workbench from development tools
Complete the installation wizard
You can then download https://www.mysql.com/products/workbench/ to connect to MySQL.
Configuration
Once you have MySQL you can run the SQL scripts which will generate the required schemas and tables.
Extract Germain Service release file (to be referred to as $SERVICE_HOME)
Open "$SERVICE_HOME/install/databases/readme.txt"
Go to "$SERVICE_HOME/install/databases/mysql"
Edit "$SERVICE_HOME/install/databases/mysql/basic-setup.sql" Please update passwords where you see "identified by 'apm_datamart'" or "identified by 'apm_config'" accordingly
Execute the SQL scripts one at a time in sequence specified in "$SERVICE_HOME/install/databases/readme.txt"
Run basic-setup.sql – This will create 2 databases as apm_config and apm_datamart with its users as apm_config/apm_config and apm_datamart/apm_datamart
Run config-*.sql by selecting the apm_config database (refer screenshot on Selecting DB below)
Run datamart-*.sql by selecting the apm_datamart database (refer to screenshot on Selecting DB Below)