Preamble
The CREATE USER statement creates a database account that allows you to log into a MySQL database.
Syntax for CREATE USER statement in MySQL
CREATE USER
user_name IDENTIFIED BY [ PASSWORD ] 'password_value';
Parameters and arguments of the statement
- user_name – the name of the database account you want to create.
- PASSWORD is optional. Whether you specify this parameter or not, the CREATE USER operator will behave identically.
- password_value – The password to assign a user name.
Let’s see how to create a user in MySQL using the CREATE USER operator.
For example:
CREATE USER
'samvel'@'localhost' IDENTIFIED BY 'klondik';
In this example, the CREATE USER operator will create a new user with the name samvel in the MySQL database, whose password is ‘klondik’.
Multiple user creation
You can create more than one user at a time in MySQL. You can use the CREATE USER operator to create multiple users separated by a comma with each user/password.
For example:
CREATE USER
'samvel'@'localhost' IDENTIFIED BY 'klondik',
'serg'@'localhost' IDENTIFIED BY 'titdog';
This example CREATE USER will create two users in MySQL. The first user will be called samvel with password ‘klondike’ and the second user will be called serg with password ‘titdog’.
Using Hash value for password
In the above examples, the open text password is displayed. You also have the option to set a password hash value (see PASSWORD function).
For example:
CREATE USER
'samvel'@'localhost' IDENTIFIED BY '*39C549BDECFBA8AFC3CE6B948C9359A0ECE08DE2';
This example CREATE USER will create a new samvel user in a MySQL database with the password hash value.
MySQL Tutorial; How to Create a MySQL Database, User and Grant Permissions
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
What Technology Leaders Must Know About Cost Estimation: Enteros, RevOps Efficiency, and Cloud FinOps Intelligence
- 4 March 2026
- Database Performance Management
Introduction The technology sector runs on innovation velocity. SaaS platforms deploy weekly releases. AI models retrain continuously. DevOps pipelines automate infrastructure changes in minutes. Global applications scale dynamically across regions. Multi-cloud architectures distribute workloads for performance and resilience. But as digital acceleration increases, so does one persistent challenge: Read more”Indian Country” highlights Enteros and its … Continue reading “What Technology Leaders Must Know About Cost Estimation: Enteros, RevOps Efficiency, and Cloud FinOps Intelligence”
What Drives Growth in Fashion Tech: Enteros AI SQL, Database Performance Management, and RevOps Intelligence
- 3 March 2026
- Database Performance Management
Introduction The fashion industry has evolved into a digital-first, data-intensive ecosystem. Global apparel brands, luxury houses, direct-to-consumer startups, and fast-fashion giants now compete not just on design and brand—but on digital performance. E-commerce platforms must handle flash sales without crashing. Omnichannel inventory systems must synchronize in real time. AI-driven personalization engines must respond instantly. Pricing … Continue reading “What Drives Growth in Fashion Tech: Enteros AI SQL, Database Performance Management, and RevOps Intelligence”
Who Should Use Enteros for Financial Performance Optimization and Cloud Cost Governance?
Introduction The financial sector is under relentless pressure to grow—without increasing risk, cost, or operational complexity. Digital-first banks are reshaping customer expectations. Capital markets firms demand real-time analytics. Insurers are automating underwriting and claims. Fintech startups scale at cloud speed. Meanwhile, regulatory requirements intensify, margins tighten, and infrastructure costs rise. At the center of all … Continue reading “Who Should Use Enteros for Financial Performance Optimization and Cloud Cost Governance?”
How to Accelerate Banking Growth with Enteros Performance Management and Generative AI
- 2 March 2026
- Database Performance Management
Introduction The banking industry is evolving at unprecedented speed. Digital-first challengers are redefining customer expectations. Legacy institutions are modernizing core systems. Real-time payments, open banking frameworks, AI-driven fraud detection, and personalized financial services are now standard. But beneath every digital innovation lies a critical truth: Banking growth depends on performance. Read more”Indian Country” highlights Enteros … Continue reading “How to Accelerate Banking Growth with Enteros Performance Management and Generative AI”