mysql create user and grant db permission databsae code example Example: create user mysql CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';