How to create a user and grant privileges on specific database in MySQL

create user 'User'@'localhost' identified by 'Password';
create database Database;
grant all on Database.* to 'User'@'localhost';