- To create the user's syntax:
Create user ' username ' @host [identified by [password] ' password '];
- Username: User Name
- Host: hostname, local host can use localhost or IP address, but other computers must use IP address to log on to remote host with wildcard "%"
- Password: User Password
Cases:
Create user ' teacher ' @ ' localhost ' identified by ' 12345 ', or
Create user ' teacher ' @ ' localhost (no password)
- Execute Grant ( while assigning permissions) Create user
Grammar:
Grant Priv_type on database or data table to [email protected] (or IP address) identified by ' 123 ';
- using MySQL Admin Modify Root account Password
- Grammar:
Mysqladmin–u root–p password "123";
Enter Password: original password (root);
- using Set Chitian Modify the normal user password (MySQL 's command)
Grammar:
Set Password=password ("000"); Modify the current user password
Set password for [email Protected]=password ("123"); Modify the specified account password
Drop user ' studentr ' @localhost;
About MySQL creating a new user and authorizing