Skip to content

Instantly share code, notes, and snippets.

@ptkdev
Last active July 25, 2018 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptkdev/1abce2ffb10560ebdf6b4bfbf21790a5 to your computer and use it in GitHub Desktop.
Save ptkdev/1abce2ffb10560ebdf6b4bfbf21790a5 to your computer and use it in GitHub Desktop.
Create MariaDB User with Password - Debian 9

Login at root

sudo mysql -u root -p

Create mysql/mariadb user and database

CREATE DATABASE testdb;
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON testdb.* TO username@localhost;
FLUSH PRIVILEGES;
quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment