Skip to content

Instantly share code, notes, and snippets.

@JohnRTitor
Last active October 3, 2024 05:35
Show Gist options
  • Save JohnRTitor/230848216041f2c4d02c228c083b4759 to your computer and use it in GitHub Desktop.
Save JohnRTitor/230848216041f2c4d02c228c083b4759 to your computer and use it in GitHub Desktop.
MariaDB setup + Nginx + PHP FPM for PHP connections

YOu can use mycli helper to get a syntax hightlighted and multiline SQL interpreter.

mycli -u masum-db -h localhost -D bookmyshow

where bookmyshow is the database name, localhost is the hostname, masum-db is the user accessing from the hostname.


Or use the traditional mariadb or mysql.

mariadb -u masum-db -h localhost -D bookmyshow -p

-p is the option to ask for password at runtime.

For these, you need mariadb server daemon started, NixOS option does it automatically, on other system you might need to start it manually.

 mariadbd-safe

Localhost connection

See an example here https://github.com/JohnRTitor/nix-conf/blob/5436dbb5d139e2f2006a6dca7e3109a256e327b4/dev-environment/nginx.nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment