Just adding this here so I wont have to search for it or ask anyone ever again.
create database db_name;
grant all privileges on db_name.* to ‘user’@’localhost’ identified by ‘password’;
1 thought on “Create MySQL Dbase and user”
This also works
mysql -u root -p
mysql> create database DBNAME;
mysql> grant all on DBNAME.* to [email protected];
mysql> set password for [email protected]=password(‘PASSWORD’);
mysql> exit
This also works
mysql -u root -p
mysql> create database DBNAME;
mysql> grant all on DBNAME.* to [email protected];
mysql> set password for [email protected]=password(‘PASSWORD’);
mysql> exit