MariaDB

Framework
MariaDB
Category
Databases
Publisher
Jetify
{
  "packages": [
    "mariadb@latest"
  ],
  "shell": {
    "init_hook": [],
    "scripts": {
      "connect_db": [
        "mysql -u devbox_user -p -D devbox_lamp"
      ],
      "test_db_setup": [
        "mkdir -p /tmp/devbox/mariadb/run",
        "export MYSQL_UNIX_PORT=/tmp/devbox/mariadb/run/mysql.sock",
        "devbox services up -b",
        "sleep 5",
        "mysql -u root < setup_db.sql",
        "devbox services stop"
      ]
    }
  },
  "nixpkgs": {
    "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
  }
}

mariadb

mariadb Notes

  1. Start the mariadb server using devbox services up
  2. Create a database using "mysql -u root < setup_db.sql"
  3. You can now connect to the database from the command line by running devbox run connect_db

Services

  • mariadb

Use devbox services start|stop [service] to interact with services

This plugin sets the following environment variables

  • MYSQL_BASEDIR=//.devbox/nix/profile/default
  • MYSQL_HOME=//.devbox/virtenv/mariadb/run
  • MYSQL_DATADIR=//.devbox/virtenv/mariadb/data
  • MYSQL_UNIX_PORT=//.devbox/virtenv/mariadb/run/mysql.sock
  • MYSQL_PID_FILE=//.devbox/virtenv/mariadb/run/mysql.pid

To show this information, run devbox info mariadb

Note that the .sock filepath can only be maximum 100 characters long. You can point to a different path by setting the MYSQL_UNIX_PORT env variable in your devbox.json as follows:

"env": {
    "MYSQL_UNIX_PORT": "/<some-other-path>/mysql.sock"
}
README.md

Level up your dev environment

No need to switch your style. Devbox works with any coding language, so you can get results as you write.
PREPARE FOR LAUNCH

Plans for teams of any size

Jetify Cloud offers pricing plans for Solo Developers to Large Enterprises, and everything in between. All plans include free credits, and you are only billed for what you use. Need something custom? Contact our team and we can help.
YOUR INPUT COUNTS

Join the community

Discuss ideas, uses and builds with the Jetify team and others.