grant access to specific database new user code example Example: create user mysql CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';