MySQL is a relational database management system developed by the Swedish MySQL AB company and is currently a product of Oracle. MySQL is one of the most popular relational database management systems. In terms of WEB applications, MySQL is one of the best RDBMS (Relational Database Management System) application software.
mysql Create user name
1. Log in to mysql database
Execute the mysql -h localhost -u root -p
command in the cmd command window and enter the password
After successful login, enter MySQL initialization interface, the welcome message "Welcome to the MySQL monitor" will appear, as well as some explanatory sentences.
2. Mysql creates user and password
create user 用户名 IDENTIFIED by '用户密码';
Example:
Use CREATE USER to create a user, the username is test1, and the password It is test1, and the host name is localhost. The SQL statement and execution process are as follows.
mysql> CREATE USER 'test1'@'localhost' IDENTIFIED BY 'test1'; Query OK, 1 rows affected (0.06 sec)
The results show that the test1 user was successfully created.
The above is the detailed content of How to create a username in mysql. For more information, please follow other related articles on the PHP Chinese website!