fede-green
10/19/2017 - 10:17 AM

Create and grant



#create the new user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
#create the new database
CREATE DATABASE newdatabase;
#assign the user to it
GRANT ALL PRIVILEGES ON newdatabase. * TO 'newuser'@'localhost';
#flush
FLUSH PRIVILEGES;