mysql创建函数 Navicat 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for

萨瓦迪卡5年前 (2021-03-17)MySql4176

mysql 创建函数出错信息如下:

1227-访问被拒绝;您需要超级权限才能执行此操作


你的权限不足,试着用root账户登录数据库操作权限
-- 查看是否开启创建函数的功能
show variables like '%func%';
-- 开启创建函数的功能

set global log_bin_trust_function_creators = 1;


[root@txinfose ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 267
Server version: 8.0.23 Source distribution

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like '%func%';
+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | ON    |
+---------------------------------+-------+
1 row in set (0.00 sec)
mysql> set global log_bin_trust_function_creators = 1;
Query OK, 0 rows affected (0.00 sec)

如果是宝塔面板,可在终端菜单 进去服务器命令行

图片.png

然后再创建函数,ok!

本文原创,转载必追究版权。

分享给朋友:

相关文章

高情商女孩,女生看了都喜欢

高情商女孩,女生看了都喜欢

 王晨阳:19岁大四,北京航空航天大学,插画专业,夜市卖过化妆品,开过儿童美术教学班,某网站签约网络小说作家,15岁开始,3年时间写了8部小数约24万字;对话1:沈东军 vs王晨阳沈东军:像...

揭秘!如何用一句话找到你的一万微友

 玩微商一年半的时间了,现在的微商如火如荼,很多刚进入微商行业的伙伴都在烦恼一个问题,那就是粉丝、粉丝,我最近调查了身边30多个微友,有25个竟然都是好友问题,有的竟然给我说主动加了50多个...

plsql 中number类型字段 取消科学计数法显示

 PL/SQL DEVELOPER中禁用科学计数法:Tools - Prefrence - SQL Window - 选择:"Number fields to_char&quo...

js/jquery 日历控件及实例下载

js/jquery 日历控件及实例下载

实现日历控件效果:页面:<link href="${base}/resource/${profile.path}/css/lhgcalendar.css" rel="...

js/jquery 实现点击图片更换头像(图片)实例

    总之一句话, 可以先将 file类型 的input 隐藏 起来,通过 图片(头像)的onclick事件 来触发 file 的onclick事件。1.引入外部js:...

jquery 操作html元素(及CSS)

jquery 操作html元素(及CSS)

 $("li").addClass("aui-user-view-cell aui-img") ;  //给元素添加样式$('#a1...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。