select convert(SUBSTR(USER(),1,INSTR(USER(),'@')-1) using latin1) : User « Privilege « MySQL Tutorial






mysql>
mysql> select convert(SUBSTR(USER(),1,INSTR(USER(),'@')-1) using latin1) ;
+------------------------------------------------------------+
| convert(SUBSTR(USER(),1,INSTR(USER(),'@')-1) using latin1) |
+------------------------------------------------------------+
| root                                                       |
+------------------------------------------------------------+
1 row in set (0.09 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)