The list is described below:
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9E/00/wKioL1mJxPvStj7RAAD3znk_EEc526.png "title=" 11. PNG "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:60px; "alt=" Wkiol1mjxpvstj7raad3znk_eec526.png "/>
Description: The above command is to authorize all permissions on the localhost host to manage dbname database through user username, password is passwd. Among them, USERNAME,DBNAME,PASSWD can be modified according to the business situation.
Example: Create a ZD user, have all permissions on the test library, allow login from localhost host to manage database, password is 123456.
First, look at the current database user situation:
Mysql> select User,host from Mysql.user;
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9E/00/wKioL1mJyJKBizxPAAAefqtK-0M921.png "title=" 11. PNG "width=" "height=" 175 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:175px; "alt=" Wkiol1mjyjkbizxpaaaefqtk-0m921.png "/> Then, execute the following authorization command:
Mysql> Grant all on test.* to [e-mail protected] identified by ' 123456 ';
Finally, look at the current database user situation:
Mysql> select User,host from Mysql.user;
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9E/00/wKioL1mJyXXhpSuOAAAhwTQ7x2k667.png "title=" 11. PNG "width=" "height=" 192 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:192px; "alt=" Wkiol1mjyxxhpsuoaaahwtq7x2k667.png "/>
To view authorized user specific permissions:
Mysql> Show grants for [email protected]; (or mysql> show grants for [email protected]\g)
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9E/01/wKiom1mJyx2SlGBNAAAfkg_--YE777.png "title=" 11. PNG "width=" "height=" 144 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:144px; "alt=" Wkiom1mjyx2slgbnaaafkg_--ye777.png "/>
Note: You can see that the default permissions are usage, that is, connection permissions, followed by the addition of the all permission!