用户MySQL create user ' monty ' @ ' localhost ' identified by ' some _ pass '; mysqlgrantallprivilegeson *.* to ' monty ' @ ' localhost '-withgrantoption; MySQL create user ' monty ' @“%”identified by ' some _ pass '; mysqlgrantallprivilegeson *.* to ' monty ' @ ' % '-withgrantoption; MySQL create user ' admin ' @ ' localhost ' identified by ' admin _ pass '; mysql GRANT RELOAD,processon *.* to ' admin ' @ ' localhost '; MySQL create user ' dummy ' @ ' localhost '; 其中用户名@后面的localhost代表:此用户只能在本地连接。
%通配符意味着任何主机都可以连接到数据库。
用户权限mysqlshowgrantsfor ' admin ' @ ' localhost '; ----------------------grantsforadmin @ lants grant reload, 进程--- * to ' admin ' @ ' localhost '---------------------------------- localhost --------------------------- -将用户MySQL drop user ' Jeffrey ' @ 密码mysqlalteruser ' Jeffrey ' @ ' localhost '-identified by ' my pass ';