Adding MariaDB to your Shell
devbox add mariadb, or in your devbox.json add
devbox.json by adding it to your include list:
devbox search mariadb. You can also view the available versions on
Nixhub
MariaDB Plugin Support
Devbox will automatically create the following configuration when you rundevbox add mariadb. You
can view the full configuration by running devbox info mariadb
Services
- mariadb
devbox services up|stop mariadb to start or stop the MariaDB Server.
Environment Variables
Files
The plugin will also create the following helper files in your project’s.devbox/virtenv folder:
- mariadb/flake.nix
- mariadb/setup_db.sh
- mariadb/process-compose.yaml
Notes
- This plugin wraps mysqld and mysql_install_db to work in your local project. For more information,
see the
flake.nixcreated in your.devbox/virtenv/mariadbfolder. - This plugin will create a new database for your project in MYSQL_DATADIR if one doesn’t exist on shell init.
- You can use
mysqldto manually start the server, andmysqladmin -u root shutdownto manually stop it .sockfilepath can only be maximum 100 characters long. You can point to a different path by setting theMYSQL_UNIX_PORTenv variable in yourdevbox.jsonas follows:
Disabling the MariaDB Plugin
You can disable the MariaDB plugin by runningdevbox add mariadb --disable-plugin, or by setting
the disable_plugin field in your devbox.json: