You will be asked Enter current password for root (enter for none): — press Enter.
Type in Y and press Enter to Set root password?.
Type in a password at the New password: prompt, and press Enter. Important: remember this root password, as you will need it later to set up WordPress.
Type in Y to Remove anonymous users.
Type in Y to Disallow root login remotely.
Type in Y to Remove test database and access to it.
Type in Y to Reload privilege tables now.
When complete, you will see the message All done! and Thanks for using MariaDB!.
sudo mysql -uroot -p create database wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO ‘root’@’localhost’ IDENTIFIED BY ‘YOURPASSWORD’; FLUSH PRIVILEGES; sudo reboot