View user information
Premise : After the database connection
View user currently logged on:
select user();
With root privileges can view all user information
select * from mysql.user
; Show the user all the information, a lot of character* from mysql.user \G
; Display all the user's own fieldselect user,password,host from mysql.user
Display the user's user, password, host these three fieldsThe root login, delete tourists (after the operation to restart the mysql service)
Visitors can view all of the users, and then delete a user a tourist, where + Conditions
delect from mysql.user where user='';
Change the root user's password management
Go modifications without logging in
mysqladmin -u username -p password -h old domain password "New Password"
mysql -uroot -p123 -hlocalhost password "456" will be changed to 456 123 Password
Modify the root download
mysql> set password for the user name @localhost = password ( 'new password');
mysql> set password for root@localhost = password('123');
After logging database, create user
They grant permissions on the database table name to name username @ hostname identified by 'password';