Create a database

The monetdb command line interface allows an administrator to create, release, start, stop and destroy databases.
It is the client tool of monetdbd and therefore relies on monetdbd to be running for all available operations.

It is strongly advised to check monetdb manual page for a comprehensive explanation of all available features. Command line manual is also available via man monetdb.

monetdb create -p 'very_strong_password' db1

A database created with this command makes it available under its database name and it is immediately available for general use.

Alternatively,

monetdb create db1                       # creates a fresh database named 'db1' in maintenance mode

A database created with this command makes it available under its database name, but not yet for use by clients, as the database is put into maintenance mode. This allows the database administrator to perform configuration steps before releasing it to users.
Note that the database administrator comes with default credentials which should be changed when creating the database.

user: monetdb
password: monetdb

Do not forget to change default credentials while in maintenance mode.

monetdb create db1                       # creates a fresh database named 'db1' in maintenance mode
monetdb start db1                        # starts the database named 'db1' in maintenance mode
mclient -u monetdb -d db1                # login with default administrator credentials
password:monetdb

sql> ALTER USER SET PASSWORD 'strong_password' USING OLD PASSWORD 'monetdb';
sql> \q
monetdb release db1                      # makes database available for normal use by any client

Success! The database is ready to be used.

You can save the user/password in a file in your home directory ~/.monetdb to simplify connections.

cat $HOME/.monetdb
user=yourusername
password=yourpassword