For a local database:
mariadb -p -u <username> <databasename>
If the server is remote, then:
mariadb -p -u <username> -h <hostname> -P <port> <databasename>
and then type in the password at the prompt.
Remember all commands end in a semicolon.
Install mariadb-server
on Debian/Ubuntu
You do all user and database creation from within the database. By default, the system root user has full administration privileges. So:
$ sudo mariadb
Then create users:
CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';
Create databases:
CREATE DATABASE <databasename> CHARACTER SET utf8mb4;
You want that utf8mb4. The "utf8" character set doesn't allow 4-byte characters like some emojis and math symbols!
Give a user all privileges on a database:
GRANT ALL PRIVILEGES ON <databasename>.* TO '<username>'@'localhost';