SELECT host, user, select_priv, update_priv FROM user : User « Privilege « MySQL Tutorial






mysql> use mysql
Database changed
mysql> SELECT host, user, select_priv, update_priv FROM user;
+------------+------+-------------+-------------+
| host       | user | select_priv | update_priv |
+------------+------+-------------+-------------+
| localhost  | root | Y           | Y           |
| production | root | Y           | Y           |
| 127.0.0.1  | root | Y           | Y           |
+------------+------+-------------+-------------+
3 rows in set (0.03 sec)

mysql>








27.8.User
27.8.1.Add a user
27.8.2.Add your database and users to the mysql database.
27.8.3.In the default setting of MySQL access privileges, every user is permitted to create databases on a local computer that begin with the word 'test.'
27.8.4.SELECT host, user, select_priv, update_priv FROM user
27.8.5.select convert(SUBSTR(USER(),1,INSTR(USER(),'@')-1) using latin1)