---
title: "创建一个MYSQL用户"
author: "czhwin"
date: "2014-08-08T12:07:48Z"
tags: []
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2014-08-08T12:07:48Z"
id: 2101699
url: "https://czhwin.iteye.com/blog/2101699"
---

**创建一个MYSQL用户**

C:&gt;mysql -uroot -p  
Enter password: \*\*\*\*\**  
Welcome to the MySQL monitor. Commands end with ; or g.  
Your MySQL connection id is 16 to server version: 5.0.18-nt

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql&gt; CREATE USER yanjz IDENTIFIED BY '123';  
Query OK, 0 rows affected (0.03 sec)

mysql&gt; GRANT ALL PRIVILEGES ON \*.* TO yanjz;  
Query OK, 0 rows affected (0.02 sec)

mysql&gt; flush privileges;  
Query OK, 0 rows affected (0.00 sec)

mysql&gt; exit  
Bye