mysql 创建函数 error Code: 1227. Access denied;
mysql> show function status;
+------+------------------+----------+------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db | Name | Type | Definer | Modified | Created | Security_type | Comment | character_set_client | collation_connection | Database Collation |
+------+------------------+----------+------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| zjzc | loadTreeByParent | FUNCTION | zjzc_app@% | 2016-06-02 21:51:04 | 2016-06-02 21:51:04 | DEFINER | | utf8 | utf8_general_ci | utf8_general_ci |
+------+------------------+----------+------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
1 row in set (0.00 sec) 重新创建函数; delimiter $$
CREATE FUNCTION `loadTreeByParent`(begin_sn INT) RETURNS varchar(600) CHARSET utf8
BEGIN
DECLARE rest VARCHAR(600);
DECLARE temp VARCHAR(60);
SET rest='$';
SET temp=CAST(begin_sn AS CHAR);
WHILE temp IS NOT NULL DO
SET rest=CONCAT(rest,',',temp);
SELECT GROUP_CONCAT(sn) INTO temp FROM ClientManager WHERE FIND_IN_SET(parent,temp)>0;
END WHILE;
RETURN rest;
END$$ mysql> show function status;
+------+------------------+----------+---------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| Db | Name | Type | Definer | Modified | Created | Security_type | Comment | character_set_client | collation_connection | Database Collation |
+------+------------------+----------+---------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
| zjzc | loadTreeByParent | FUNCTION | root@% | 2016-06-03 19:04:41 | 2016-06-03 19:04:41 | DEFINER | | utf8 | utf8_general_ci | utf8_general_ci |
+------+------------------+----------+---------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
1 row in set (0.00 sec) CREATE DEFINER=`root`@`%` FUNCTION `loadTreeByParent`(begin_sn INT) RETURNS varchar(600) CHARSET utf8
BEGIN
DECLARE rest VARCHAR(600);
DECLARE temp VARCHAR(60);
SET rest='$';
SET temp=CAST(begin_sn AS CHAR);
WHILE temp IS NOT NULL DO
SET rest=CONCAT(rest,',',temp);
SELECT GROUP_CONCAT(sn) INTO temp FROM ClientManager WHERE FIND_IN_SET(parent,temp)>0;
END WHILE;
RETURN rest;
END 19:08:02 CREATE DEFINER=`zjzc_app`@`%` FUNCTION `loadTreeByParent`(begin_sn INT) RETURNS varchar(600) CHARSET utf8 BEGIN
DECLARE rest VARCHAR(600); DECLARE temp VARCHAR(60); SET rest='$'; SET temp=CAST(begin_sn AS CHAR);
WHILE temp IS NOT NULL DO SET rest=CONCAT(rest,',',temp);
SELECT GROUP_CONCAT(sn) INTO temp FROM ClientManager WHERE FIND_IN_SET(parent,temp)>0; END WHILE;
RETURN rest; END Error Code: 1227. Access denied; you need (at least one of) the SUPER privilege(s) for this operation 0.016 sec 直接进入终端,root登陆执行; mysql> delimiter $$
mysql> CREATE DEFINER=`zjzc_app`@`%` FUNCTION `loadTreeByParent`(begin_sn INT) RETURNS varchar(600) CHARSET utf8
-> BEGIN
-> DECLARE rest VARCHAR(600);
-> DECLARE temp VARCHAR(60);
-> SET rest='$';
-> SET temp=CAST(begin_sn AS CHAR);
-> WHILE temp IS NOT NULL DO
-> SET rest=CONCAT(rest,',',temp);
-> SELECT GROUP_CONCAT(sn) INTO temp FROM ClientManager WHERE FIND_IN_SET(parent,temp)>0;
-> END WHILE;
-> RETURN rest;
-> END$$
Query OK, 0 rows affected (0.00 sec)
mysql 创建函数 error Code: 1227. Access denied;的更多相关文章
- MySql 创建函数 Error Code : 1418
查看日志信息:show variables like 'log_%';显示'log_bin'.'log_bin_trust_function_creators'等状态 解决方法: 关闭binary l ...
- win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...
- MySQL学习笔记——ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Enter password: E ...
- mysql 创建函数ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_f
mysql 创建函数的时候 报错 ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL D ...
- mysql安装启动 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
首次安装mysql 启动 mysql -uroot 以下错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using ...
- mysql登录遇到ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
执行mysql -uroot -p,出现如下问题 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pass ...
- [解决] Error Code: 1044. Access denied for user 'root'@'%' to database
今天在测试集群用的mysql上,遇到个权限的问题: SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSynta ...
- Error Code: 1044. Access denied for user 'root'@'%' to database
mysql> SELECT host,user,password,Grant_priv,Super_priv FROM mysql.user; +--------------+--------- ...
- Linux下mysql出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
安装: 1.新开的云服务器,需要检测系统是否自带安装mysql # yum list installed | grep mysql 2.如果发现有系统自带mysql,果断这么干 # yum -y re ...
随机推荐
- 关于Cocos2d-x 3.0正式版 粒子问题在IOS上正常显示,在Android下有问题的解决方式
前几个在Cocos2d-x论坛上,有人提到粒子系统的问题..这里列举一下解决的方法: 或许到时候大家用粒子效果的时候也会发现这个问题,如今把这个问题的解决办法说出来.至于原因我也不知道是引擎的问题还是 ...
- 前序 中序 后序 遍历 递归 非递归算法 java实现
前序遍历 非递归 public void preordernorec(TreeNode root){ //System.out.println("先序遍历(非递归):"); //用 ...
- Reverse Words in a String | LeetCode OJ | C++
我的思路:先读取每一个单词,存放到容器中:读取完毕后,将容器中的单词倒序写入输出中. #include<iostream> #include<string> #include& ...
- [转]Centos6.5使用yum安装mysql—配置MySQL允许远程登录
一.mysql安装 第1步.yum安装mysql[root@stonex ~]# yum -y install mysql-server安装结果:Installed: mysql-server ...
- 清华集训2014 day1 task2 主旋律
题目 这可算是一道非常好的关于容斥原理的题了. 算法 好吧,这题我毫无思路,直接给正解. 首先,问题的正面不容易求,那么就求反面吧: 有多少种添加边的方案,使得这个图是DAG图(这里及以下所说的DAG ...
- Android 应用程序签名
本文主要介绍Android应用程序签名的相关理论知识以及怎样公布Android应用程序. 1.签名的概念 为大家所熟知的日常生活中的签名,它是代表某个人的特殊标记,用于唯一标识某个人.而Android ...
- Linux - 输入输出流程序 代码(C)
输入输出流程序 代码(C) 本文地址:http://blog.csdn.net/caroline_wendy 使用输入输出流,控制文件流. STDIN_FILENO,STDOUT_FILENO代表标准 ...
- 【Tesseract-OCR】在VS2012环境下调用API方法---注意避免名字冲突
由于在VS2012中使用OpenCV可以得到插件ImageWatch.vsix的支持,查看图像非常方便,所以一直想在VS2012环境下把Tesseract-OCR融合进来,但是这一错误折腾了我好久: ...
- java运行脚本语言demo
public class Test { /** * @param args * @throws IOException */ public static void main(String[] arg ...
- Web用户控件
用户控件是个什么东西?自定义的反复重用的控件集合 注意:创建好用户控件后,必须添加到其他web页中才能显示出来,不能直接作为一个网页来显示,因此也就不能设置用户控件为“起始页”. 用户控件与ASP.N ...