mysql用户函数_mysql用户函数区别

只能说我菜,在网上找了下没发现谁解释过他们四个的区别,那就只能自己来了。下面是通过mysql客户端查看到的帮助信息,直接贴解释吧。 user:Returns the current MySQL username and hostname as a string in the utf8 character set. system_user:SYSTEM_

只能说我菜,在网上找了下没发现谁解释过他们四个的区别,,那就只能自己来了。下面是通过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()跟前三个也很像,不过他偶尔又会有点区别。

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值