Preferences and Connection Settings
Preferences and global settings
In addition to the data stored on a per-server basis; Monyog has a database storing global user preferences (preferences.config database) and also a very tiny text file (MONyog.ini), that only has what minimal information is required for Monyog to start.
There is a [preferences] table in connection.data which is used for storing the default processlist query.
CREATE TABLE IF NOT EXISTS [preferences] ( [name] VARCHAR(50) DEFAULT '' NOT NULL PRIMARY KEY UNIQUE, [value] TEXT DEFAULT '');
The 'server_names' table is used for storing all the connection details.
CREATE TABLE [server_names] (id INTEGER DEFAULT 0 NOT NULL PRIMARY KEY UNIQUE, key VARCHAR(255) DEFAULT '' NOT NULL, value VARCHAR(255) DEFAULT '' NOT NULL);
Connections management by database manipulations.
You can make use of this information to create a script or application to manage connections without using the Monyog 'register servers' GUI or simply (in some cases) perform operations from the file system manually (NOTE: Please make sure that Monyog is stopped before performing any of the operations).
- create a new connection by creating a folder with an unused 4-digit numerical name, create connections.data databases, populate it with connection and Monyog version details and also create an empty mysql.data database (with structure but without data). Also an empty system.data and sniffer.data database are required if you want to monitor Linux system data and use the Query sniffer.
- clone a connection by copying connection.data from an existing connection.
- edit connection details (ip, port etc.) by updating the respective value in connection.data.
After Monyog is restarted, changes will have effect.