How to create a MariaDB / MySQL database and user

  •  Create a MariaDB / MySQL database and user:

N.B.! You need to be logged in to MariDB CLI / MySQL CLI as root (or other user with enough privileges to create databases, users and grant permissions). 

CREATE DATABASE mydatabase;
GRANT ALL PRIVILEGES ON mydatabase.* TO 'new-username'@'host' IDENTIFIED BY "password";
FLUSH PRIVILEGES;
  • DONE!


  •  Minimum Requirements and How-to:

    MariaDB / MySQL

  • Recommended Requirements and How-to:

    MariaDB / MySQL

Leave a Reply