Basic Enterprise Application Realm

Basic Enterprise Application Realm Documentation

  • 1 About BEAR
  • 2 Release Notes
  • 3 Developer Toolkit
  • 4 Installation & Upgrades
    • 4.1 Installation Steps
    • 4.2 Network Requirements
    • 4.3 Application Server Initialization (First Run)
    • 4.4 Uninstallation
  • 5 Backend Adminitration
    • 5.1 Introduction
    • 5.2 Common Commands
    • 5.3 Application Server Commands
    • 5.4 Resource Monitor Commands
    • 5.5 Sharepoint Commands
    • 5.6 Database Commands
  • 6 Frontend Adminitration
    • 6.1 User Management
    • 6.2 Package Management
    • 6.3 Installing Documentation Packages
    • 6.4 Application Storage
    • 6.5 Resource Monitoring
    • 6.6 Resource Scaling
    • 6.7 Starting & Stopping BEAR
    • 6.8 Security
      • 6.8.1 TLS
    • 6.9 Physical Storage
      • 6.9.1 RAID
      • 6.9.2 File Systems
      • 6.9.3 Viewing the Storage Summary
      • 6.9.4 Decommissioning (wiping) Disks
      • 6.9.5 Storage Management
    • 6.10 Event Distribution
    • 6.11 Hostnames & Ports

5.6 Database Commands

January 24th, 2026

The database can be manually controlled by an experienced DBA, although this should not be required. There are several commands for adjusting how the database runs.

5.6.1 bear_database_backup

Performs a backup of the database instance and places that backup in bear/backups/database

Usage

bear_database_backup

Example

# bear_database_backup

5.6.2 bear_database_binlog

Enables or disables binary logging in MariaDB. Alternatively, with no arguments it will report the current status binary logging.

It should be noted that binary logging should be enabled for almost any scenario including test systems. In rare cases, it may be desirable to get a slight performance gain from disabling binary logging but this provides zero fault recovery. Binary logging should only be disabled if the BEAR deployment is essentially considered disposable.

Usage

bear_database_binlog [on|off]

Example

Getting the current binary logging status

# ./bear_database_binlog Binary logging is currently enabled (on).

Disabling binary logging

# ./bear_database_binlog off Binary logging has been deactivated (off).

5.6.3 bear_database_get_sizes

Provides a summary report of all the sizes for each tenant database.

Usage

bear_database_get_sizes

Example

# ./bear_database_get_sizes Database 'events' consumes: 1 MiB on disk. Database 'mysql' consumes: 2 MiB on disk. Database 'performance_schema' consumes: 1 MiB on disk. Database 'session' consumes: 1 MiB on disk. Database 'test' consumes: 1 MiB on disk. /bear/database file system usage... Filesystem 1M-blocks Used Available Use% Mounted on /dev/mapper/cl-root 17394 3190 14205 19% /

5.6.4 bear_database_passwd

Sets both the instance root password and the accepted network connection mask. This command must be run once after a new installation of the BEAR database otherwise clients will be unable to connect to it.

It can also be used to get a list of valid users and network connection masks which can be useful when troubleshooting client connection failures.

Usage

USAGE 1: bear_database_passwd <CURRENT_IP_PREFIX> <CURRENT_PASSWORD> <NEW_IP_PREFIX> <NEW_PASSWORD> USAGE 2: bear_database_passwd <CURRENT_IP_PREFIX> <NEW_IP_PREFIX> USAGE 3: bear_database_passwd getinfo

Examples

Displaying current users

# ./bear_database_passwd getinfo Password: +--------+---------------+ | User | Host | +--------+---------------+ | root | 127.0.0.1 | | bear | 192.168.1.% | | root | 192.168.1.% | | root | ::1 | | | bear-database | | root | bear-database | | | localhost | | backup | localhost | | bear | localhost | | root | localhost | +--------+---------------+

Setting a new root user and network connection mask (interactive)

# ./bear_database_passwd 0.0.0.0 192.168.1. Current password: ******** New password: ******** Confirm password: ******** BEAR database root password updated.

Setting a new root user and network connection mask (non interactive)

# ./bear_database_passwd 0.0.0.0 Abcd1234 192.168.1. SomePassword123 BEAR database root password updated.

5.6.5 bear_database_reconfig

Rebuilds the MariaDB instance configuration file. This command is generally called by other commands such as start_dtatabase but can also be used directly. The main use for this to be run manually is to repair a broken manually altered /etc/mysql.cnf file with one based on the default template in the event the database fails to start after user tampering.

Usage

bear_database_reconfig

5.6.6 restart_database

Restarts the database following the following sequence:

  1. Gracefully stop the MariaDB service.
  2. Reapply the clear config using bear_database_reconfig.
  3. Gracefully start the MariaDB service.
Usage

restart_database

5.6.7 start_database

Makes the BEAR database persistently active by performing three steps in order:

  1. Reapply the clear config using bear_database_reconfig.
  2. Enable the MariaDB service.
  3. Start the MariaDB service.

It is important to note that this is not a normal startup command but a persistent state command. If called, then the BEAR database will remain as an auto start service (starts after reboot) as mariaDB until stopped with stop_database.

Usage

start_database

5.6.8 stop_database

Stops and persistently disables the BEAR database by performing two steps in order:

  1. Stop the MariDB service.
  2. Disable the MariaDB service.

Once stopped using this command, the BEAR database will be completely disabled and will not restart following a reboot.

Usage

stop_database

previous: Sharepoint Commands next: User Management