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

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

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!

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

分享给朋友:

相关文章

js动态加载复选框checkbox(XML串)

 首先,使用JS动态产生Checkbox可以采用如下类似的语句:代码如下:var checkBox=document.createElement("input");che...

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

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

jquery 操作html元素(及CSS)

jquery 操作html元素(及CSS)

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

程序员为什么不炫富

程序员为什么不炫富

 提到互联网,尤其是互联网工程师们,人们往往会想到两个词:“高薪”和“高压”。在知乎上“为什么很少见工资高的程序员炫富?”的问题下,一个得票很高的答案是:“乐意炫富的人,不是因为有钱,而是因为付出的少...

dwz+jfinal 市县下拉菜单二级联动(实例)

在DWZ文档中对组合框combox的是这样描述的:在传统的select 用class 定义:class=”combox”, html 扩展:保留原有属性name,  增加了属性:ref。re...

樊山越玲 一周年

樊山越玲 一周年

2015-12-25樊先森:周末有约吗?玲玲:有约,不过也得先以你为主啊。樊先森:昂,这样说我还挺开心的。2015-3-26玲玲:亲爱的,苹果是你买的吗?已经收到了,谢谢老公玲玲:有点小惊喜樊先森:那...

发表评论

访客

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