分享

写回答

发帖

[提问] 无法创建mysql函数?

GoDaddy GoDaddy 1015 人阅读 | 3 人回复

发表于 2010-5-28 23:33:09 | 显示全部楼层 |阅读模式

DELIMITER $$

DROP FUNCTION IF EXISTS `get_c` $$
CREATE FUNCTION `get_c` () RETURNS INT
BEGIN
  return 5;
END $$

DELIMITER ;

错误如下:
#1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

而log_bin_trust_function_creators这个变量没有权限修改。

回答|共 3 个

sinall

发表于 2010-5-29 00:38:01 | 显示全部楼层

Do you restrict any features in MySQL 4.1/5.0?

Date submitted: 2-14-2007
Rating
UN:F [1.7.5_995]
please wait...

Leave a Comment
Share:

    * Twitter
    * Facebook
    * Digg
    * del.icio.us

LoadingAdd to favorites

    * Topic: MySQL
*

Yes. In order to protect our shared servers we restrict the following features:

MySQL 5.0:

    * Triggers will not be supported in the MySql 5.0 offering because the SUPER privilege is needed to run all triggers. A bug report was submitted to MySql AB for a privilege tables fix in later versions of MySql 5.1.
    * Stored functions are not allowed, however, deterministic stored procedures/routines will be supported. For more information see Are stored procedures allowed in MySQL

MySQL 4.1 and 5.0:

    * The Berkeley storage engine is no longer supported by us or MySQL AB. If you have tables which use the Berkeley storage engine you may continue to use that table, however we will not support it. We advise that all customers convert their Berkeley storage engine tables into InnoDB.


______________________________________________________________________
悲剧啊。。。

zhao2271395

发表于 2010-6-6 19:22:37 | 显示全部楼层

问题解决了吗???我的错误
You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

add.c

发表于 2010-6-7 11:55:15 | 显示全部楼层

具体错误不清楚.
不过创建数据库是没问题的, 参考GoDaddy空间数据库管理教程
RAKSmart
您需要登录后才可以回帖 登录 | 注册

本版积分规则