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

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

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...

js限制input只能输入数字、英文、汉字

 1.只能输入数字和英文的:  <input onkeyup="value=value.replace(/[\W]/g,'') "...

org.tigris.subversion.javahl.ClientException:Attempted to lock an already-locked dir

 svn更新或提交时候报错:org.tigris.subversion.javahl.ClientException:Attempted to lock an already-locke...

freemarker 判断日期变量为空处理 及InvalidReferenceException异常处理

at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98);InvalidR...

MyEclipse10.7注册码生成

注意经验里的工具可能不可用,请点击 生成注册码工具  下载。提取码:p1w4MyEclipse10.7注册码激活步骤:点击下面的链接http://jingyan.baidu.com/arti...

开机密码忘记怎么办

1、重新启动计算机,在启动画面出现后马上按下F8键(不同类型型号电脑启动键不一样,参考附加),选择“带命令行的安全模式”。2、运行过程结束时,系统列出了系统超级用户“administrator”和本地...

发表评论

访客

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