You are here

Database

Database overview

The database overview of a new (= empty) Ops Center looks as follows:

Empty database overview

When you have added some databases you can select a database in the Database overview to configure or check it:

Database overview

To add a new database to the Ops Center click on the Add Database button.

Add or edit database

In the mask to add or edit a database you have to enter:

  • a database name (this name must be unique in your company). Ideally this name is the same you use in MyEnv and in the FromDual Backup Manager.
  • the server this database is located on.
  • the directory where the MySQL binaries are installed (basedir). Typically this is /usr. If the database is under MyEnv control use the same value as in myenv.conf. If you are not sure try this command: dirname $(dirname $(which mysqld)).
  • the directory where the MySQL data are located (datadir). Typically this is /var/lib/mysql. If you are not sure try this command: SHOW GLOBAL VARIABLES LIKE 'datadir';.
  • the location of your database configuration file (my.cnf/my.ini).
  • The service name or IP address your database listens to. This is often the same name/address as the server. If you have a dedicated name/IP for your database use this one.
  • The port MySQL listens (typically 3306).
  • The database user Ops Center should use. You should use a user which clearly identifies what it is used for. So we recommend: focmm_admin. But you can also use root. This user should be created as follows:
    CREATE USER 'focmm_admin'@'<ip_of_focmm>' IDENTIFIED BY '<some_secret_password>';
    GRANT ALL ON *.* TO 'focmm_admin'@'<ip_of_focmm>'
  • The database users password as specified above (<ip_of_focmm>).
  • If this database is readonly or not. This is mostly important for replication slaves.

Add or edit database

Configuration overview

In the database configuration overview you can either edit the database again, delete it or choose some other database operations:

Database configuration overview

Database checks

To get an overview of the state of your database you can either click the Check Database button for all checks or you can run each check individually by clicking on the Check now button:

Database checks

When you run the checks Ops Center shows you for each check what it was doing, what the result was and what you should do to fix the problem:

Checking the database

You might be surprised that some checks have been performed already. This is because Ops Center runs periodically in the background all the jobs. So it might have happened Ops Center was faster than you checking the database...

If all checks passed successful the database checks look as follows:

Database checks successful

Operations

In the operations tab you:

  • Stop and start your database.
  • Set database to readonly or read-write.
  • Backup your database.
  • And see the 20 last lines of your MySQL error log.

Database operations

Starting a database looks as follows:

Start database

Stopping a database looks as follows:

Stop database

And setting a database to readonly as follows:

Set database readonly

Important: If you want to make the readonly state persistent after the next database restart you have to manually add it to the database configuration file (my.cnf).

Processlist

In the processlist you can see who is actually connected to the database and which query is running:

Processlist

You can further filter for specific connections or sort most of the columns. If a query is using too much of resources you can also kill the query or event terminate the connection. The refresh interval can be set from 2 to 60 seconds.

Variables

In the variables tab you see all the actual database configuration variables and their values. If Ops Centers has an opinion about your settings the values are marked in color and an information icon is shown:

Variables