您当前的位置: 首页 > 数据库教程 > MySQL教程 > mysql用户函数区别

mysql用户函数区别

作者:不详 来源:网络 发布时间: 2014-07-17 12:02 点击:
只能说我菜,在网上找了下没发现谁解释过他们四个的区别,那就只能自己来了。下面是通过mysql客户端查看到的帮助信息,直接贴解释吧。 user:Returns the current MySQL username and hostname as a string in the utf8 character set. system_user:SYSTEM_USER() is

mysql用户函数区别

  只能说我菜,在网上找了下没发现谁解释过他们四个的区别,那就只能自己来了。下面是通过mysql客户端查看到的帮助信息,直接贴解释吧。

  user:Returns the current MySQL username and hostname as a string in the utf8 character set.

  system_user:SYSTEM_USER() is a synonym for USER().

  session_user:SESSION_USER() is a synonym for USER().

  current_user:

  Returns the username and hostname combination for the MySQL account

  that the server used to authenticate the current client. This account

  determines your access privileges. As of MySQL 5.0.10, within a stored

  routine that is defined with the SQL SECURITY DEFINER characteristic,

  CURRENT_USER() returns the creator of the routine. The return value is

  a string in the utf8 character set.

  The value of CURRENT_USER() can differ from the value of USER().

  其实想翻一下再放出来的,怎奈自己那见不人的英语水平,就不翻译了。总的来说:user()、system_user()、session_user(),这三是同一个东西(synonym )。然后current_user()跟前三个也很像,不过他偶尔又会有点区别。
分享到:
本文"mysql用户函数区别"由远航站长收集整理而来,仅供大家学习与参考使用。更多网站制作教程尽在远航站长站。
顶一下
(0)
0%
踩一下
(0)
0%
[点击 次] [返回上一页] [打印]
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
关于本站 - 联系我们 - 网站声明 - 友情连接- 网站地图 - 站点地图 - 返回顶部
Copyright © 2007-2013 www.yhzhan.com(远航站长). All Rights Reserved .
远航站长:为中小站长提供最佳的学习与交流平台,提供网页制作与网站编程等各类网站制作教程.
官方QQ:445490277 网站群:26680406 网站备案号:豫ICP备07500620号-4