Add new user with Database MySQL

CREATE USER ‘w2project’@‘localhost’ IDENTIFIED BY ‘***’;

GRANT USAGE ON * . * TO ‘w2project’@‘localhost’ IDENTIFIED BY ‘***’ WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

CREATE DATABASE IF NOT EXISTS `w2project` ;

GRANT ALL PRIVILEGES ON `w2project` . * TO ‘w2project’@‘localhost’;

 

GRANT ALL PRIVILEGES ON DBname.* TO user@127.0.0.1 IDENTIFIED BY ‘Ps@oordddddd’;