Quick way to create a dababase and user with password for MySQL/MariaDB

CREATE DATABASE db_name; 
CREATE USER 'db_usr'@'%' IDENTIFIED BY 'db_pwd';
GRANT ALL PRIVILEGES ON db_name.* TO 'db_usr'@'%';
FLUSH PRIVILEGES;