Configuration
The service reads /etc/aios/asql.conf, a file of KEY=value lines. Restart after a change: sudo systemctl restart aios-compute. /opt/aios/bin/asql-serve --print shows the command the file produces.
Server
| Key | Default | Meaning |
|---|---|---|
AIOS_ROOT | /opt/aios/root | data directory |
SQL_DB | sql_db | store directory under the root |
MYSQL_PORT | 3307 | MySQL port |
MYSQL_BIND | 0.0.0.0 | listen address; 127.0.0.1 whenever no MYSQL_USER is set |
MYSQL_USER | none | main login |
MYSQL_PASS_FILE | none | file whose first line is the main login's password |
MYSQL_SOCKET | none | Unix socket path |
MYSQL_TLS_CERT, MYSQL_TLS_KEY | none | enable TLS |
MYSQL_TLS_REQUIRE | off | 1: remote clients must use TLS |
MYSQL_CHARSET | off | 1: honour the client's character set |
RPC_PORT | 7311 | JSON RPC port |
PUBLIC | off | 1: JSON RPC listens beyond 127.0.0.1 |
TOKEN_FILE | none | JSON RPC token |
Replication
CDC_HOST, CDC_PORT, CDC_USER, CDC_PASS_FILE, CDC_DB, CDC_TABLES, CDC_LOG_FILE, CDC_LOG_POS. See Mirroring MySQL and MariaDB.
Environment
Set these in the service's environment (sudo systemctl edit aios-compute, then Environment=NAME=value):
| Variable | Default | Effect |
|---|---|---|
AIOS_REDO_SYNC | 1 | when commits reach the disk; see Durability |
AIOS_SQL_STRICT | off | 1: strict sql_mode by default |
AIOS_SQL_SECURE_FILE_PRIV | none | directory server-side LOAD DATA INFILE may read |
AIOS_SQL_CACHE_MB | on | 0 turns the result cache off |
AIOS_SQL_FK | on | 0 stops enforcing foreign keys |
AIOS_THINGS_HISTORY | 2 | history lines kept per Thing key |
AIOS_TXN_CONCURRENT | on | 0: one transaction writes at a time |
AIOS_CDC_TRACE | off | 1: log every applied replication change |
Files
| Path | Holds |
|---|---|
/etc/aios/asql.conf | configuration (readable by root and the aios group) |
/opt/aios/bin | programs |
/opt/aios/root | data: the store, users, capability key, license |
/opt/aios/root/sql_db/connections.ini | profiles Things and Cells write to |
