Enter MySql or MariaDB
sudo mysql
Show current databases
show databases;
Create database
create database yourdbname;
Now assign privileges to this database
grant all privileges on yourdbname.* to 'yourusername'@'localhost' identified by 'yourpassword';
Flush the privileges
flush privileges;
Check privileges
show grants for 'yourusername'@'yourdbname';