Local database connection manager.
- Go 1.24
- Build binary for command (file will be generated under
./bin/dbcmby default).
$ make build- (optional) Add path to bin file.
- if not set, call the command directly by its path, eg.
./bin/dbcm.
$ export PATH=$PWD/bin:$PATH- Use the command to manage local database connections.
- compatible with: postgresql, mysql
# for the first time, initialize file to store managing states
$ dbcm init
# add connection to management
$ dbcm add test psql -h localhost -d testdb -u user -w pw
# connect to database by given name
$ dbcm connect test
# show connections and sessions
$ dbcm ls
$ dbcm sessions- Set up docker containers.
$ make start- Enter docker container with database client.
$ make client- Use the
dbcmcommand.