首先连接本地数据库,用户名为root,
C:/>mysql -h localhost -u root -p
Enter password:
查看函数
show function status;
查看存储过程
SHOW PROCEDURE STATUS;
查看创建语句,假设名为order_cancelled
show create procedure order_cancelled\G;
查看定义
show create procedure/function sp_name
1418错误解决方法
第二种是信任子程序的创建者,禁止创建、修改子程序时对SUPER权限的要求,设置log_bin_trust_routine_creators全局系统变量为1。设置方法有三种:
1.在客户端上执行SET GLOBAL log_bin_trust_function_creators = 1;
2.MySQL启动时,加上--log-bin-trust-function-creators选贤,参数设置为1
3.在MySQL配置文件my.ini或my.cnf中的[mysqld]段上加log-bin-trust-function-creators=1