MYSQL : How to create new user and assign database. in ubantu

Follow this command

sudo mysql -u root -p

CREATE DATABASE databasename;

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

GRANT ALL ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

FLUSH PRIVILEGES;

EXIT;

Comments

Popular posts from this blog

Install Xampp On Kubuntu 18.10 LTS