SQL: Create User: >=mysql5.7.6
View Users:mysql> Select user,host,authentication_string from Mysql.user;ALTER USER:ALTER USER [IF exists]user () identified by ' auth_string ';
ADDING USER Account:CREATE USER ' finley ' @ ' localhost ' identified by ' some_pass '; GRANT all privileges on *. * to ' finley ' @ ' localhost ' with GRANT OPTION;CREATE USER ' Finley ' @ '% ' identified by ' some_pass '; GRANT all privileges on *. * to ' Finley ' @ '% ' with GRANT OPTION;mysql> CREATE USER ' admin ' @ ' localhost ' identified by ' admin_pass ';mysql> GRANT reload,process on * * to ' admin ' @ ' localhost ';mysql> CREATE USER ' dummy ' @ ' localhost '; mysql> SHOW CREATE USER ' admin ' @ ' localhost ' \g*************************** 1. Row ***************************CREATE USER for [email protected]:CREATE USER ' admin ' @ ' localhost ' identified with ' Mysql_native_password ' as ' * 67acdebdab923990001f0ffb017eb8ed41861105 ' REQUIRE NONE PASSWORD EXPIRE DEFAULT account UNLOCK
DROP USER:DROP USER ' jeffrey ' @ ' localhost ';
"SQL chapter--Creating users based on mysql5.7--"