Interactive Books' Atelier's blog

How are you?

MySQL new user and database

1 year ago | Quick Recipe
mysql -u root -p
SHOW DATABASES;
CREATE DATABASE database name;
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT type_of_permission ON database_name.table_name TO ‘username’@'localhost’;

Sources: - https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial - https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql by Etel Sverdlov