MariaDB add new user

[user@hostname] # mysql
MariaDB [(none)]>CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';
MariaDB [(none)]>SELECT User FROM mysql.user;
MariaDB [(none)]>GRANT ALL PRIVILEGES ON *.* TO 'user1'@localhost IDENTIFIED BY 'password1';
MariaDB [(none)]>GRANT ALL PRIVILEGES ON 'yourDB'.* TO 'user1'@localhost;
MariaDB [(none)]>FLUSH PRIVILEGES;
MariaDB [(none)]>SHOW GRANTS FOR 'user1'@localhost;