2. Installation
2.1 Requirements#
MIRAJ is distributed as ready-to-use binaries, with no external dependency to install. Choose the package that matches your system and the edition you want (see 1.3):
| System | Package | Contents |
|---|---|---|
| Windows 64-bit | MIRAJ-<version>-Express-setup.exe, MIRAJ-<version>-Entreprise-setup.exe | Installation wizard (2.2): server, console, library, ODBC driver, manager, configuration editor |
| Windows 64-bit | MIRAJ-<version>-<edition>-win64.zip (Express, Entreprise, Cluster, Developer) | miraj-server.exe, miraj-cli.exe, miraj.dll, the ODBC driver miraj_odbc.dll and its two PowerShell registration scripts, two .bat launchers, LISEZMOI.txt and readme.txt; the Cluster archive adds miraj-cluster-pki.exe and miraj-proxy.exe |
| Windows 32-bit | MIRAJ-<version>-Win32.zip | miraj.dll only, for Win32 applications (a 64-bit executable cannot load the 64-bit library in a 32-bit process) |
macOS (Apple Silicon: arm64) | MIRAJ-<version>-Express-macos-<arch>.pkg | Installation package of the Express edition (below) |
| Linux x64 | MIRAJ-<version>-Express-linux-x64.zip | miraj-server, miraj-cli, libmiraj.so, the ODBC driver libmiraj_odbc.so and its registration scripts, readme.txt |
Each package comes with its SHA-256 fingerprint (.sha256 file).
The Enterprise and Cluster editions come with a license file miraj.lic. After installation, store it with miraj-server --root <folder> --install-license miraj.lic (or paste the license into a terminal with --install-license -): see chapter 30. Without a license, the server runs with the features and limits of the Express edition.
The Developer edition is the one for the development workstation: it offers all the features of the Cluster edition (replication, partitioning, MCP endpoint) to write and test an application, but on a single core, with at most 20 GB of data (error 9011) and 24 hours of operation between two restarts (error 9012 afterwards, data intact). It is installed by simple copy (see Manual installation); the installation wizard of 2.2 exists only for Express and Enterprise.
For Miraj Express and Miraj Enterprise on Windows, the installation wizard puts the programs in place, creates the root account, sets the port, the SQL language and automatic startup, and allows uninstalling from the Windows programs list. Without it, no installation is needed: copy the executables wherever you like and run them. The folder from which miraj-server or miraj-cli is launched does not matter: it is the data folder (--root) that determines where your databases live.
macOS package#
The package MIRAJ-<version>-Express-macos-<arch>.pkg (macOS 11 or later) installs:
| Item | Location |
|---|---|
miraj-server, miraj-cli, miraj-config-editor, miraj-backup, the uninstall script miraj-uninstall.sh | /usr/local/miraj-express/bin; miraj-server and miraj-cli are linked in /usr/local/bin |
Library libmiraj.dylib, ODBC driver libmiraj_odbc.dylib (declared "MIRAJ ODBC Driver", chapter 28) | /usr/local/miraj-express/lib |
Configuration miraj_config.xml (port 7007, listening on the loopback interface) | next to miraj-server, created only if it does not exist |
| Data and account vault keys | /Library/Application Support/Miraj Express/data and keys, reserved to root and the admin group |
Server service (LaunchDaemon com.cirtasoft.miraj.express.server): starts with the machine, restarts after an unexpected stop, output in /var/log/miraj-express.log | /Library/LaunchDaemons |
| Miraj Manager and Miraj Uninstaller | /Applications |
The package does not create the root account itself. On first launch, Miraj Manager shows a first-configuration page: password of root (required, entered twice; the Generate and copy button picks one at random and copies it to the clipboard), port, listening (loopback interface or all interfaces) and SQL language of the instance (MIRAJ language, the default, or PostgreSQL). The server then starts through its LaunchDaemon. During an update, the server is stopped and restarted; data, keys and configuration are kept.
Uninstalling. Miraj Uninstaller offers Uninstall (data and keys are kept) or Uninstall and delete data (confirmation required, irreversible), then macOS asks for the administrator password. From the command line: sudo /usr/local/miraj-express/bin/miraj-uninstall.sh (--yes for no questions, --purge to also delete data and keys). Uninstalling removes the server, the LaunchDaemons (server, scheduled backups, remote access), the applications, the links in /usr/local/bin and the ODBC driver; a kept configuration joins the data folder. If the data was kept, reinstalling opens the Miraj Manager configuration page, which offers to keep the existing accounts (current password of root) or to define a new root password (the other accounts are then deleted, the databases remain). Details: 21.14.
Linux#
The Linux archive is unpacked wherever you like; run miraj-server as in 2.3 (Linux-style paths: ./miraj-server --root /var/lib/miraj --log). The ODBC driver is registered with the supplied script (chapter 28).
2.2 Installing Miraj Express with the installation wizard#
On Windows, Miraj Express and Miraj Enterprise are each installed by a single-file installer (MIRAJ-<version>-Express-setup.exe or MIRAJ-<version>-Entreprise-setup.exe — the same wizard for both editions): it contains miraj-server.exe, miraj.dll, miraj-cli.exe, the configuration editor (miraj-config-editor.exe) and the Miraj Server Manager (miraj-manager.exe, see 15.9), and puts them on the machine while setting the port, the root password and automatic startup. It requests administrator rights at launch (User Account Control prompt) and opens at the center of the screen, in the language of Windows; the list at the bottom left selects another one among the ten languages of the error messages (Arabic is displayed right to left). The scheduled tasks, the uninstall key and the folders created carry the name of the installed edition ("Miraj Express" or "Miraj Enterprise"): the two editions therefore install side by side without interfering.
The wizard moves forward page by page with the buttons < Back, Next > and Cancel (a confirmation is requested before quitting):
- Welcome. If Miraj Express is already installed, the wizard detects it and offers to update or change the settings, or to uninstall; in both cases, the databases are kept. The folders, port and options of the existing installation are reused.
- Destination folders. Program folder (default
C:\Program Files\Miraj Express) and Data folder (defaultC:\ProgramData\Miraj Express\data), with Browse… to choose others. A data folder that already contains databases is kept as is. - Server settings.
- TCP port: 7007 by default; a port already used by another program is flagged.
- SQL language of the instance: MIRAJ language (first choice, the default) or PostgreSQL. PostgreSQL adds the
POSTGRESQLelement to thesql_modeof the configuration file: the port then speaks the PostgreSQL protocol (psql, PostgreSQL drivers) and no longer the legacy protocol; Gestium and the legacy-protocol tools require a MIRAJ-language instance, whereasmiraj-cli, the MIRAJ tools, the MIRAJ ODBC driver and themirajPython library adapt to both. The configuration editor lets you change this choice later, taken into account when the server restarts (see 15.10). - Accept connections from: this computer only (listens on
127.0.0.1) or the whole network (listens on0.0.0.0). In the second case, the port is opened in the Windows firewall ("Miraj Express" rule); without a TLS certificate, exchanges travel in clear text (see 15. Server administration). - Start the server with Windows: scheduled task "Miraj Express", run at machine startup under the SYSTEM account, with no time limit and restarted if it stops (
miraj-server.exe --root <data> --log). - Create Start menu shortcuts: "Miraj Express" folder with the manager and the configuration editor (the latter runs as administrator, the configuration file being in the program folder).
- Start MIRAJ Manager with Windows (checked by default): the manager starts when an administrator logs on, as an icon only in the notification area (
miraj-manager.exe --tray, task "Miraj Express - manager", with administrator rights and no prompt). - Launch MIRAJ Manager at the end of the installation (checked by default): the manager opens as soon as the server responds.
- Administrator account. Password of the
rootaccount, entered twice (a password shorter than 8 characters is discouraged). It is passed to the server through theMIRAJ_INITIAL_ROOT_PASSWORDvariable, never on a command line. On an existing data folder, the accounts are kept, including therootpassword; the Recreate accounts box replaces them with the localrootalone, with the password entered (like--reset-accounts, see 15.5.3). - Ready to install. Summary of the choices; Install starts the installation.
- Installation. A progress bar follows the steps: stopping the Miraj programs launched from the program folder (never another server on the machine; the remote access agent, if running, is first stopped cleanly), extracting the files, creating the
rootaccount, configuration, firewall, shortcuts, scheduled tasks, registration in the Windows programs list, restarting the remote access agent through its task if enabled, starting the server. Show details unfolds the log of the steps; an optional step that fails (firewall, shortcuts, manager startup) appears there as a warning without stopping the installation. - Finish. The wizard shows the listening address and port and the login account. On failure, the error message is displayed (with, if the server does not respond, the path of
server.log) and < Back returns to the summary to fix and restart.
Installed files#
C:\Program Files\Miraj Express\
├── miraj-server.exe
├── miraj.dll
├── miraj_odbc.dll (ODBC driver "MIRAJ ODBC Driver", declared to Windows: see chapter 28)
├── miraj-cli.exe
├── miraj-config-editor.exe
├── miraj-manager.exe
├── miraj_config.xml (your settings, read first by the server)
├── miraj_default.xml (reference, regenerated at each startup)
└── uninstall.exe (uninstall from the Windows programs list)
C:\ProgramData\Miraj Express\data\
└── (databases, account vault, server.log: see 2.6)
C:\ProgramData\Miraj Express\manager\
└── (manager files, created as it is used: see 21.11)miraj_config.xml is placed next to miraj-server.exe (see 2.5): at first installation, the server creates in it the commented template of all variables, then the wizard writes port and bind in it; the other settings are changed with the configuration editor or the manager, and apply when the server restarts. During an update, only the port and bind lines are rewritten; a configuration left in the data folder by an earlier installation is moved next to the server, with all its settings.
The ODBC driver is declared in the registry (64-bit view: HKLM\SOFTWARE\ODBC\ODBCINST.INI\MIRAJ ODBC Driver and the Installed value of ODBC Drivers); see chapter 28.
Uninstalling#
Miraj Express appears in Settings → Apps (or Control Panel → Programs and Features) under the name "Miraj Express". Uninstall opens the wizard directly on the confirmation page, which requires the root password: it is verified by a connection to the installed server, started if needed; a wrong password refuses the uninstall. The same page, and the same verification, are obtained by running miraj-express-installer.exe again and choosing Uninstall.
Uninstalling stops the server and the manager, then removes the scheduled tasks (server, manager, scheduled backups), the firewall rule, the shortcuts, the programs list entry and the program files; the ODBC driver declaration is removed. The data folder is kept, and miraj_config.xml is stored in it: a reinstall on the same folder finds the databases, accounts and settings again. Delete the data folder yourself if you no longer need it. The manager folder (C:\ProgramData\Miraj Express\manager) is likewise kept; delete it if you no longer need it.
Manual installation#
Without the wizard (other edition, workstation without administrator rights, script), copy the executables wherever you like and run miraj-server as described in 2.3.
2.3 Starting miraj-server#
miraj-server.exe --root D:\donnees --logThis command opens (or creates if it does not exist) the data folder D:\donnees, then listens on 127.0.0.1:7007. When the folder is first opened, the local root account is created with a randomly generated 24-character password, displayed only once on the console:
================================================================================
Compte root@localhost créé avec le mot de passe provisoire : Xq7mPt3hKc9WbZ2rNf8sLd4v
Il n'est affiché qu'une fois et n'est écrit nulle part : notez-le, puis changez-le :
ALTER USER root@localhost IDENTIFIED BY 'nouveau mot de passe';
================================================================================The startup line (version, edition, listening address, folder, thread count, license) and the configuration file in use follow:
MIRAJ 1.0.0 Entreprise - serveur console sur 127.0.0.1:7007, dossier "D:\donnees", 12 fils, licence MRJ-2026-000123 (Société Exemple SA), valide jusqu'au 2027-10-11.
Configuration : D:\donnees\miraj_config.xml.This password is written neither to server.log nor anywhere else: note it down before closing the console. For an installation script, choose it yourself with --initial-root-password <password> or the environment variable MIRAJ_INITIAL_ROOT_PASSWORD (preferable: a command line is visible to the other users of the machine); it is then not displayed, a line only states its origin (Compte root@localhost créé avec le mot de passe initial donné par --initial-root-password (à retirer ensuite).). These settings are only used to create the account vault: afterwards, they are ignored (a note says so at startup) and root is changed with ALTER USER. A lost password is replaced with --reset-accounts (see 15. Server administration, § 15.5.3).
Command-line options#
All options accept a case-insensitive name (--Root and --root are equivalent). miraj-server --help displays the full list.
| Option | Default value | Effect |
|---|---|---|
--root <folder> | data | Data folder to open (created if it does not exist). |
--config <file.xml> | next to the executable, otherwise <folder>/miraj_config.xml | Configuration file to use instead of the one in the data folder. |
--bind <address> | 127.0.0.1 | Listening address of the server. |
--port <port> | 7007 | TCP listening port (--port 0 lets the system pick a free port). |
--log | disabled | Maintains <folder>/miraj/server.log (SQL errors, bugs, server incidents; successful queries are not recorded). |
--lang <code> | en | Language of session error messages: en, fr, zh, hi, es, ar, pt, ru, de, ja. |
--result-buffer <MB> | 64 | Memory kept per connection for a client that is slow to read its result. |
--write-timeout <seconds> | 60 | Maximum wait for a client that no longer reads its result, before disconnecting (net_write_timeout). |
--connect-timeout <seconds> | 10 | Maximum time to complete a client's handshake, TLS included, counted from the acceptance of the connection (connect_timeout). |
--max-connections <n> | 151 | At most this many simultaneous connections (from 1 to 100,000); beyond that, the client receives error 1040 (max_connections). |
--max-connect-errors <n> | 100 | Consecutive authentication failures from an address that block it for 15 minutes (error 1129; FLUSH HOSTS unblocks it; max_connect_errors). |
--idle-timeout <seconds> | 28800 (8 h) | Maximum delay between two commands of an already connected client (wait_timeout). |
--lock-wait-timeout <seconds> | 50 | Maximum wait for an explicit table lock (LOCK TABLES), or for a table held by another session's long statement, before error 1205. |
--sql-mode <modes> | STRICT_TRANS_TABLES | Initial sql_mode of sessions; --sql-mode "": non-strict mode (NULL or invalid value replaced by the column's implicit value, with a warning). The POSTGRESQL element chooses the PostgreSQL language for the whole instance: the main port then speaks the PostgreSQL protocol (psql, PostgreSQL drivers) instead of the legacy protocol; taken into account at startup only (see 15.10). |
--deferred-update ON|OFF | ON | Deferred update of UPDATEs of a row designated by its key: re-evaluated at COMMIT rather than taking the row (see 13. Transactions and concurrency). |
--concurrency mvocc|pessimistic | mvocc | Concurrency model: optimistic multiversion control (no waiting on rows) or classic row locks. Temporary option, while the two models are being compared. |
--key-dir <folder> | profile of the account that runs the server | Folder of the keys of the encrypted account vault, kept outside the data folder (see 15. Server administration). |
--data-encryption ON|OFF | OFF | Enterprise and Cluster editions: encrypts a new data folder (see 24. Encryption at rest). A folder that is already encrypted stays encrypted regardless. |
--default-table-encryption ON|OFF | ON | On an encrypted folder: databases and tables created without an ENCRYPTION clause are encrypted. |
--encryption-passphrase-file <file> | — | File holding the passphrase of an encrypted folder (protected by DPAPI on Windows, 0600 permissions elsewhere); the environment variable MIRAJ_ENCRYPTION_PASSPHRASE takes precedence. |
--initial-root-password <password> | randomly generated | Password of root when the account vault is created (first startup or --reset-accounts); ignored afterwards. Also through the environment variable MIRAJ_INITIAL_ROOT_PASSWORD. |
--require-password ON|OFF | ON | Refuses an account with no password reachable from another machine (require_password, see 14. Accounts and privileges). |
--local-infile ON|OFF | ON | Allows LOAD DATA LOCAL and LOAD XML LOCAL (file sent by the client); OFF: error 1148. |
--reset-accounts | — | Recreates the account vault with the local root alone and a new password, randomly generated and displayed once, or the one from --initial-root-password (used alone, with --root and possibly --key-dir). |
--secure-file-priv <folder> | empty (LOAD_FILE disabled) | Only folder readable by LOAD_FILE, for accounts with the FILE privilege. |
--lob-threshold <bytes> | 8192 | Size from which a BLOB value leaves the table for the table's separate store. |
--lob-cache <MB> | 128 | Size of the read cache of externalized BLOBs. |
--event-scheduler ON|OFF|DISABLED | OFF | State of the event scheduler at startup (DISABLED forbids enabling it afterwards). |
--parallel-threads <n> | one per core | Threads that all the server's queries may occupy in total (Enterprise/Cluster edition; no effect in Express and Developer, limited to one thread). |
--save-policy relaxed|statement|periodic | relaxed | Write durability policy (see 15. Server administration). |
--save-interval <milliseconds> | 5000 | Interval of the periodic journal flush (save-policy relaxed or periodic). |
--slow-query-log | disabled | Enables the slow query log. |
--slow-query-log-file <file> | <folder>/miraj/slow.log | Slow query log file (also enables it). |
--long-query-time <seconds> | 10 | Duration beyond which a statement is a slow query. |
--max-statement-time <seconds> | 300 (5 min) | Duration beyond which a statement is automatically aborted (error 1969), so that a procedure loop, a trigger or an endless query never holds the server; 0: no limit. |
--max-statement-memory <bytes> | 2147483648 (2 GiB) | Memory that the sorts, groupings, DISTINCT, windows and joins of one statement may hold at most (error 1038 or 1114 beyond; 0: no limit). |
--max-server-memory <bytes> | half of the physical memory | Same cap, for all the server's statements together (error 9067 beyond; 0: no limit). |
--min-free-disk-space <bytes> | 536870912 (512 MiB) | Minimum free space of the data volume: below it, INSERT and UPDATE are refused (error 1021); 0 disables the check. |
--tls-cert <file.pem> / --tls-key <file.pem> | none | TLS certificate and private key; the server then encrypts connections and refuses clients that do not connect with TLS (error 3159). These two options go together. |
--allow-plain-with-tls | disabled | With a certificate, also accepts unencrypted clients (TLS only offered, former behavior). |
--require-tls | disabled | Requires TLS even with --allow-plain-with-tls (assumes --tls-cert/--tls-key). |
--cluster-config <cluster.toml> | cluster.toml file next to the executable | Node configuration file, Cluster edition only. |
--log-bin[=<path>], --server-id <n>, --gtid-domain-id <n>, --max-binlog-size <bytes>, --binlog-expire-logs-seconds <n>, --sync-binlog <n>, --log-slave-updates | disabled | Binary log and binary log replication (Enterprise, Cluster and Developer editions; chapter 16). |
--max-allowed-packet <bytes> | 67108864 (64 MiB) | Maximum size of a client command (from 1 KiB to 1 GiB; max_allowed_packet, error 1153 beyond). |
--group-concat-max-len <bytes> | 1048576 (1 MiB) | Initial value of group_concat_max_len: a longer GROUP_CONCAT result is truncated (warning 1260). |
--lazy-databases ON|OFF | ON | The tables of a database are only read at its first use; OFF reads all databases at startup. |
--backup-dir <folder> | empty (BACKUP / RESTORE refused) | Only folder where BACKUP DATABASE writes and from which RESTORE DATABASE reads (see 18). |
--proxy-protocol-from <address,…> | none | Addresses of miraj-proxy allowed to announce the real client address (PROXY header; chapter 22). |
--change-events-… | see chapter 20 | Initial settings of change events (LISTEN, WAIT FOR CHANGES): buffer-events, buffer-size, bulk-rows, max-payload, max-listeners, wait-timeout, retention. No effect in Express. |
--mcp ON|OFF | OFF | MCP endpoint for AI assistants (not in Express), on --mcp-bind (127.0.0.1) and --mcp-port (7008); --mcp-idle-timeout (300), --mcp-statement-timeout (30) and --mcp-max-rows (5000) tune it (chapter 19). |
--rest ON|OFF | OFF | REST endpoint (all editions), on --rest-bind (127.0.0.1) and --rest-port (7009), with --rest-endpoints, --rest-tables, --rest-sql, --rest-basic and other settings (chapter 23). |
--journal-gap-replay | disabled | Forced replay, for one startup, of a journal damaged in the middle (see 15. Server administration). |
--license-file <miraj.lic> | search described in 30.2 | License file of the Enterprise and Cluster editions. |
--install-license <miraj.lic | MLIC1-… | -> | — | Verifies the license, stores it in <folder>/miraj/miraj.lic and exits, without starting the server (with --root, chapter 30). |
--machine-id | — | Displays the machine fingerprint, for a machine-bound license, and exits. |
--help, -h, /? | — | Displays usage and exits. |
Each command-line option can also be set permanently in miraj_config.xml (see 2.5); in case of conflict, the command line wins.
2.4 Installing and using miraj-cli#
miraj-cli needs no particular installation: it is a standalone executable that works in two ways.
Connected to a server. With a connection option (--host, --port, --user, --password…), the console connects to miraj-server and recognizes the language of the instance (MIRAJ or PostgreSQL):
miraj-cli.exe --host 127.0.0.1 --port 7007 --user root --passwordMIRAJ 1.0.0 - connecté (langage MIRAJ) - tapez \help pour l'aide, \q pour quitter.
miraj>--password without a value asks for the password at the keyboard, without echo; without --password, it is read from the environment variable MIRAJ_PASSWORD if it exists. --password=<password> also works, with a warning: the command line is visible in the process list.
Embedded, on a data folder. Without a connection option, the console opens the folder directly, with no network or account (MIRAJ language):
miraj-cli.exe --root D:\donneesMIRAJ 1.0.0 Entreprise - tapez \help pour l'aide, \q pour quitter.
miraj>A data folder is opened by only one process at a time: as long as miraj-server serves it, this mode fails with Dossier de données « D:\donnees » déjà ouvert par un autre processus MIRAJ; go through the network instead.
Command-line options#
| Option | Effect |
|---|---|
--host <host> | Connects to the server on this host (127.0.0.1 by default). |
--port <port> | Server port (7007 by default). |
--user <account> | Login account (root by default). |
--password, --ask-password | Password requested at the keyboard, without echo. |
--password=<password> | Password given on the command line (discouraged). |
--protocol auto|miraj|postgresql | Language of the instance: recognized at connection (auto, default), or forced. |
--ssl | TLS required, server certificate verified (host name included). |
--ssl-ca <file.pem> | Authority that signed the server certificate (implies --ssl). |
--ssl-insecure | TLS required, certificate accepted without verification. |
--no-ssl | Clear-text connection. With no TLS option at all, the connection is encrypted if the server offers it, certificate not verified. |
--root <folder> | Embedded mode: data folder to open (data by default). |
--config <file.xml> | Embedded mode: configuration file to use instead of the one in the data folder. |
-d <database> | Selects a database at startup (equivalent to USE <database>, or to the current schema on a PostgreSQL-language instance). |
-e "<SQL>" | Executes the statement (or the statements separated by ;) then exits, without starting interactive mode. |
--lang <code> | Language of error messages: en, fr, zh, hi, es, ar, pt, ru, de, ja. |
--json | Displays results as JSON rather than as a table. |
--timing | Displays the execution time of each statement. |
--no-history | Neither reads nor writes the history of entered statements. |
<file.sql> | Executes the given file then exits. |
See 25. miraj-cli for the full reference of interactive mode commands (\d, \l, \history, source, etc.).
2.5 Configuration file#
Like a classic SQL server configuration file, MIRAJ reads an XML file at startup:
miraj_config.xml— your settings, read at startup: the one in the folder ofmiraj-server.exeif it exists there, otherwise the one in the data folder (where MIRAJ creates a commented skeleton if it does not exist yet).--configforces another path; the file in use is written at startup (Configuration : …).miraj_default.xml, next to the previous file — regenerated at each startup, lists all recognized variables with their default value. It is a reference document only: the server never reads it back.
Order of precedence, from weakest to strongest: engine default value, then miraj_config.xml, then command-line argument.
2.6 Layout of the data folder#
The data folder (--root) is the administration unit of a MIRAJ server or console: everything that belongs to an installation lives in it.
D:\donnees\
├── miraj_config.xml (your settings, if there are none next to miraj-server.exe)
├── miraj_default.xml (reference, regenerated at each startup next to the previous one)
├── miraj.lck (lock: only one process opens the folder at a time)
├── journal.reserve (4 MiB reserved to free up space on a full disk)
├── miraj\
│ ├── accounts.mra (encrypted account vault)
│ ├── miraj.lic (license installed by --install-license, Enterprise and Cluster editions)
│ ├── keyring.mrk (keyring of a folder encrypted at rest, chapter 24)
│ ├── server.log (with --log: errors, bugs, incidents)
│ └── slow.log (with --slow-query-log)
└── ma_base\ (one database = one subfolder)
├── journal.mrl (write-ahead log of the database)
├── sequences.mrq (sequences of the database, if it has any)
├── clients.mrj (one table = one .mrj file)
├── clients.bmrj (externalized BLOBs of the table, if present)
├── archives.dmrj (a disk table, ENGINE = Aria / MyISAM / DISK)
└── archives.dbmrj (large values of the disk table, if present)- One database = one subfolder of the data folder.
- One table = one
.mrjfile in the subfolder of its database, in the internal MIRA v2 format. - The
BLOBvalues of a table whose size exceeds--lob-thresholdare kept in a separate store,<table>.bmrj, next to the.mrjfile. - A disk table (see Storage engines) is a
<table>.dmrjfile instead of the.mrj; its values larger than a quarter page (about 4 KiB) go into<table>.dbmrj. - Each database has its own write-ahead log,
journal.mrl, replayed on opening if the last shutdown was not clean. journal.reservecontains no data: on a full volume, only operations that free up space (TRUNCATE, partition maintenance) consume it; it is recreated afterwards. Other writes stop well before, at the--min-free-disk-spacethreshold (error 1021).- The account vault (
accounts.mra) is common to the data folder; it is encrypted, and its key is stored by default outside the data folder (see below and 15. Server administration).
2.7 Default security#
- Local listening only. Without
--bind,miraj-serverlistens only on127.0.0.1: no remote machine can connect to it until you explicitly choose another listening address. Administrator account created at first launch, protected by a password. When the data folder is created,
miraj-servercreates the localrootaccount with a randomly generated password, displayed only once on the console (or the one from--initial-root-password). Replace it with your own at the first connection:ALTER USER root@localhost IDENTIFIED BY 'un-mot-de-passe-solide';The embedded engine (
miraj-clion a local folder, library) does not create a vault on opening: its localrootstays without a password until the folder has been used bymiraj-server.- Protected remote accounts. An account with no password reachable from another machine is refused (
require_password), and the initialrootaccount holdsSYSTEM_USER: an account that only hasCREATE USERcan neither modify nor drop it. - Repeated attempts slowed down. Each authentication failure delays the next response to the same address (100 ms, then double, 5 s at most); after
--max-connect-errorsconsecutive failures (100), the address is blocked for 15 minutes. At most--max-connectionsclients (151) are served at once, and a handshake must complete within--connect-timeoutseconds. - TLS required as soon as a certificate is provided (
--allow-plain-with-tlsto also accept unencrypted clients). - Account vault keys stored outside the data folder, by default in the profile of the account that runs the server (
--key-dirto choose another location).
The details of account management, privileges, encryption in transit (TLS) and monitoring are covered in 15. Server administration and 14. Accounts and privileges.