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
See an example here https://github.com/JohnRTitor/nix-conf/blob/5436dbb5d139e2f2006a6dca7e3109a256e327b4/dev-environment/nginx.nix