Create a new database and create a user for wordpress

Create a database:

mysql -u root -p

MariaDB [(none)]>

CREATE DATABASE 'mydb';

Create a user:
MariaDB [(none)]>

CREATE USER 'username'@'localhost' IDENTIFIED BY 'passwordinplaintext';

Grant privileges:

GRANT ALL PRIVILEGES ON mydb.* TO 'username'@'localhost';
FLUSH PRIVILEGES;