# DB Parameters in Ubuntu

This document provides the steps to install MySQL, create the ovaledgedb database, and configure MySQL database parameters in an Ubuntu environment for OvalEdge applications. It includes MySQL repository configuration, server installation, database initialization, and parameter updates required for stable database connectivity and optimized performance. Follow the steps in the order provided to complete the setup successfully.

### Prerequisites

Ensure the following prerequisites are met before starting the installation:

* Ubuntu 22.04 LTS or later
* Sudo privileges on the target VM
* Stable internet connectivity on the target VM
* Minimum 4 GB RAM available on the server
* Outbound access to <https://dev.mysql.com>
* MasterScripts SQL file provided by the OvalEdge team

## Update System Packages

1. Open Terminal
   * Log in to the Ubuntu VM
2. Update Package Repository Information
   * Run the following command to refresh the package repository metadata:

     ```
     sudo apt update -y
     ```

     Sample Reference screenshot:

     <figure><img src="/files/RdddeaCBlHLZIIaQvxzh" alt=""><figcaption></figcaption></figure>

## Download MySQL APT Configuration Package

1. Download the MySQL Package
   * Run the following command to download the MySQL APT configuration package: <https://dev.mysql.com/get/mysql-apt-config_0.8.34-1_all.deb>

     ```
     wget https://dev.mysql.com/get/mysql-apt-config_0.8.34-1_all.deb
     ```

     Sample Reference Screenshot:

     <figure><img src="/files/R74eQDPUys4dqi0NzLyp" alt=""><figcaption></figcaption></figure>

## Configure MySQL APT Repository

1. Install the MySQL Repository Package
   * Run the following command:

     ```
     sudo dpkg -i mysql-apt-config_0.8.34-1_all.deb
     ```
2. Select MySQL Version

   * During installation:
     * Select MySQL 8.4
     * Select OK and press Enter

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Use the arrow keys and Enter key to navigate the package configuration screen.</p></div>

   Sample Reference Screenshot:

   <figure><img src="/files/cGY9mFV2T10aUAsggGal" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/nxRdRelK6eddPWKylQ5P" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Select MySQL and click OK, as shown in the above screenshot.
{% endhint %}

## Update Repository Information

1. Refresh Repository Metadata
   * Run the following command to update the repository information:

     ```
     sudo apt update -y
     ```

     Sample Reference Screenshot:&#x20;

     <figure><img src="/files/jePjaaxkeiQ7dKart36G" alt=""><figcaption></figcaption></figure>

## Install MySQL Server

1. Install MySQL
   * Run the following command:

     ```
     sudo apt-get install mysql-server -y
     ```

     Sample Reference Screenshot:

     <figure><img src="/files/WzAfTBTUm583OKfnPjGN" alt=""><figcaption></figcaption></figure>

     <figure><img src="/files/156vG6pIqbuVrxwJ6S2V" alt=""><figcaption></figcaption></figure>

     <figure><img src="/files/iOGRUXud1jsI3SHfRuGi" alt=""><figcaption></figcaption></figure>

2. Configure Root Password
   * During installation:
     * Enter the MySQL root password
     * Confirm the password

{% hint style="info" %}
Configure the password in accordance with the organizational security policies.
{% endhint %}

## Verify MySQL Installation

1. Verify MySQL Version
   * Run the following command:

     ```
     mysql --version
     ```

     Sample Reference Screenshot:

     <figure><img src="/files/rHsucv4RO9bFffT5oMK9" alt=""><figcaption></figcaption></figure>
2. Exit MySQL Shell
   * If the MySQL shell opens, run the following command to exit:<br>

     ```
     exit
     ```

## Configure MySQL Parameters

1. Open MySQL Configuration File
   * Run the following command:<br>

     ```
     sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
     ```
2. Update MySQL Parameters
3. Add or update the following parameters under the \[mysqld] section:

   ```
   [mysqld]
   max_binlog_size=1G
   binlog_expire_logs_seconds=2592000
   group_concat_max_len=4294967295
   max_connections=600
   max_allowed_packet=1G
   bind-address=0.0.0.0
   innodb_buffer_pool_size=8G
   ```

   Sample Reference Screenshot:

   <div align="left"><figure><img src="/files/5pRRK4ODSGNcp1CAXy43" alt=""><figcaption></figcaption></figure></div>

### Parameter Description

<table><thead><tr><th width="243">Parameter</th><th>Descriptio</th></tr></thead><tbody><tr><td>max_binlog_size</td><td>Defines the maximum binary log file size</td></tr><tr><td>binlog_expire_logs_seconds</td><td>Defines binary log retention duration</td></tr><tr><td>group_concat_max_len</td><td>Increases maximum GROUP_CONCAT() result length</td></tr><tr><td>max_connections</td><td>Defines maximum concurrent database connections</td></tr><tr><td>max_allowed_packet</td><td>Defines the maximum packet size allowed by MySQL</td></tr><tr><td>bind-address</td><td>Enables remote MySQL access</td></tr><tr><td>innodb_buffer_pool_size</td><td>Allocates memory for InnoDB caching and performance</td></tr></tbody></table>

* Save the configuration file and exit the editor.

{% hint style="info" %}

* Set bind-address=0.0.0.0 only when remote database access is required
* Configure innodb\_buffer\_pool\_size based on available server memory&#x20;
* Recommended buffer pool allocation is 50%–70% of total RAM
  {% endhint %}

## Restart and Enable MySQL Service

1. Restart MySQL Service
   * Run the following command:

     ```
     sudo systemctl restart mysql
     ```
2. Enable MySQL Service
   * Run the following command:

     ```
     sudo systemctl enable mysql
     ```

     Sample Reference Screenshot:

     <figure><img src="/files/9HLzwJeIN49JVeQDTTVj" alt=""><figcaption></figcaption></figure>

## Initialize OvalEdge Database

1. Transfer MasterScripts File
   * Transfer the MasterScripts SQL file provided by the OvalEdge team to the MySQL VM.\
     Example:

     ```
     wget <Master_scripts_URL>
     ```

     Sample Reference Screenshot:

     <figure><img src="/files/0ZXhf0Wjeb79FRtn2xri" alt=""><figcaption></figcaption></figure>
2. Log in to MySQL
   * Run the following command:

     ```
     mysql -u root -p
     ```

     Sample Reference Screenshot:

     <figure><img src="/files/ULnrxp2oPsoUO5IvPwk8" alt=""><figcaption></figcaption></figure>
3. Execute MasterScripts File
   * Run the following command inside the MySQL shell:

     ```
     source <Path_of_MasterScripts_file>
     ```
4. Exit MySQL Shell
   * Run the following command:

     ```
     exit
     ```

## Verify Database Creation

1. Log in to MySQL
   * Run the following command:

     ```
     mysql -u root -p
     ```
2. Verify Databases
   * Run the following command:

     ```
     SHOW DATABASES;
     ```

     Sample Reference Screenshot:\
     ![](/files/JZ8oTz81ssoA8CHWJ5li)

{% hint style="info" %}
The presence of the ovaledgedb database confirms successful database initialization.
{% endhint %}

## Update Additional MySQL Parameters

1. Open MySQL Configuration File
   * Run one of the following commands based on the server configuration:

     ```
     sudo nano /etc/mysql/my.cnf
     ```

     or

     ```
     sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
     ```
2. Update Additional Parameters
   * Add or update the following parameters under the \[mysqld] section:

     ```
     [mysqld]
     sql_generate_invisible_primary_key = OFF
     max_binlog_size = 512M
     binlog_expire_logs_seconds = 604800
     max_allowed_packet = 256M
     group_concat_max_len = 65535
     innodb_buffer_pool_size = 10GB
     ```

     Sample Reference Screenshot:

     <div align="left"><img src="/files/tg48hs5AJpuaYjf0Usdi" alt="" height="177" width="574"></div>

* Save the configuration file and exit the editor.

## Apply Configuration Changes

1. Restart MySQL Service
   * Run the following command:

     ```
     sudo systemctl restart mysql
     ```

     Sample Reference Screenshot:

     <div align="left"><img src="/files/dTQKDOKdqD5Sl6wbOhch" alt="" height="35" width="568"></div>
2. Verify MySQL Service Status
   * Run the following command

     ```
     sudo systemctl status mysql
     ```

     Sample Reference Screenshot:

     <div align="left"><img src="/files/PQW0jrn7ogiWvK9W98zL" alt="" height="170" width="574"></div>

***

Copyright © 2026, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/deployment-and-maintenance/configuration/db-parameters-in-ubuntu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
