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

萨瓦迪卡6年前 (2021-03-17)MySql5889

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!

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

分享给朋友:

相关文章

freeMarker 截取字符串(操作字符串函数 )

<#if c.proSummary!?length gt 25>  <!-- 如果长度 >25 截取25个字-->    ...

MySQL数据库字段varchar转换成date类型

MySQL也跟其他数据库一样有自己内置的转换函数:str_to_date(params,convert)。select str_to_date(cases.complainDate,'%Y-%...

mysql 建存储过程 实例

drop PROCEDURE if EXISTS sp_lasqCREATE PROCEDURE sp_lasq()    COMMENT '超过5天自动立案&#...

如果总是有人说你瘦,如何神回复

如果总是有人说你瘦,如何神回复

恩,我不做领导很多年了邓小平爷爷 也很瘦哦, 并不影响成为一个伟大的男人我这是高寿(瘦)别说我瘦,我只是胖的不明显而已!我就是瘦着玩玩,谁像你胖得那么认真。嗳,你还别说,你胖了! 恩 ,真的!真的吗?...

UUID 生成方法

import java.util.UUID;/**     * UUID 生成方法     * @return uuid &nbs...

org.apache.subversion.javahl.ClientException: ¾ܾø·ÃÎʡ£ svn: Can't move 'E:\workspace\TourMarkets\.

org.apache.subversion.javahl.ClientException: ¾ܾø·ÃÎʡ£  svn: Can't move 'E:\workspace\T...

发表评论

访客

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