Database
Updated 07 Sep 2025
2 min read
How to Create Users and Databases in MySQL
Managing users and databases is a fundamental MySQL administration task. This guide shows how to create a user, create a database, and grant that user the permissions needed to work with the database. 1. Create a New MySQL User Start by creating a user with its own login credentials. Basic syntax: CREATE USER 'user' IDENTIFIED BY 'password'; 'user': the username to create. 'password': the password for that user. Example: