at MySql.Data.MySqlClient.MySqlStream.ReadPacket 或 FUNCTION account.AddMinutes does not exist
Application Exception
MySql.Data.MySqlClient.MySqlException
FUNCTION account.AddMinutes does not exist
Description: HTTP 500.Error processing request. Details: Non-web exception. Exception origin (name of application or object): MySql.Data. Exception stack trace:
at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00096] in <861c41359f7d4496a8fdf269ae744290>:0
at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00026] in <861c41359f7d4496a8fdf269ae744290>:0
at MySql.Data.MySqlClient.Driver.GetResult (System.Int32 statementId, System.Int32& affectedRows, System.Int64& insertedId) [0x00000] in <861c41359f7d4496a8fdf269ae744290>:0
at MySql.Data.MySqlClient.Driver.NextResult (System.Int32 statementId, System.Boolean force) [0x00023] in <861c41359f7d4496a8fdf269ae744290>:0
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00205] in <861c41359f7d4496a8fdf269ae744290>:0
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x00315] in <861c41359f7d4496a8fdf269ae744290>:0
at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(System.Data.CommandBehavior)
at MySql.Data.Entity.EFMySqlCommand.ExecuteDbDataReader (System.Data.CommandBehavior behavior) [0x00000] in <b27518aaf75f49a0a3ab22b953222fb2>:0
at System.Data.Common.DbCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x00000] in <cfa990f4664f406f913105998890457d>:0
at (wrapper remoting-invoke-with-check) System.Data.Common.DbCommand.ExecuteReader(System.Data.CommandBehavior)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c (System.Data.Common.DbCommand t, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext`1[TResult] c) [0x00007] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1[TInterceptor].Dispatch[TTarget,TInterceptionContext,TResult] (TTarget target, System.Func`3[T1,T2,TResult] operation, TInterceptionContext interceptionContext, System.Action`3[T1,T2,T3] executing, System.Action`3[T1,T2,T3] executed) [0x0000f] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader (System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) [0x00042] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader (System.Data.CommandBehavior behavior) [0x00046] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Common.DbCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x00000] in <cfa990f4664f406f913105998890457d>:0
at (wrapper remoting-invoke-with-check) System.Data.Common.DbCommand.ExecuteReader(System.Data.CommandBehavior)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands (System.Data.Entity.Core.EntityClient.EntityCommand entityCommand, System.Data.CommandBehavior behavior) [0x0000a] in <000f54522ad145bf987b3043022f9799>:0
Version Information: 5.8.1.0 (tarball); ASP.NET Version: 4.0.30319.42000
FUNCTION account.AddMinutes does not exist
[Err] - Expression # of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c 在 /etc/my.cnf 文件里加上如下:
sql_mode='NO_ENGINE_SUBSTITUTION'
然后,重启Mysql服务就可以解决了!
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its de 错误解决办法 是我们开启了bin-log, 我们就必须指定我们的函数是否是
DETERMINISTIC 不确定的
NO SQL 没有SQl语句,当然也不会修改数据
READS SQL DATA 只是读取数据,当然也不会修改数据
MODIFIES SQL DATA 要修改数据
CONTAINS SQL 包含了SQL语句 其中在function里面,只有 DETERMINISTIC, NO SQL 和 READS SQL DATA 被支持。如果我们开启了 bin-log, 我们就必须为我们的function指定一个参数。 在MySQL中创建函数时出现这种错误的解决方法:
set global log_bin_trust_function_creators=TRUE;
DROP FUNCTION IF EXISTS `AddMinutes`;
DELIMITER ;;
CREATE DEFINER=`root`@`%` FUNCTION `AddMinutes`(actualDateTime datetime, minutesToAdd int) RETURNS datetime
BEGIN
RETURN DATE_ADD(actualDateTime, INTERVAL minutesToAdd MINUTE);
END
;;
DELIMITER ;
at MySql.Data.MySqlClient.MySqlStream.ReadPacket 或 FUNCTION account.AddMinutes does not exist的更多相关文章
- MySql.Data.MySqlClient.MySqlException: Parameter ‘@maxid’ must be defined
本文涉及到的mysql知识点: mysql中的if条件语句用法: IF(expr1,expr2,expr3) mysql使用变量(mysql中变量不用事前申明) mysql事务 testcase 为了 ...
- 无法为具有固定名称“MySql.Data.MySqlClient”的 ADO.NET 提供程序加载在应用程序配置文件中注册的实体框架提供程序类型“MySql.Data.MySqlClient.MySqlProviderServices,MySql.Data.Entity.EF6”
"System.InvalidOperationException"类型的未经处理的异常在 mscorlib.dll 中发生 其他信息: 无法为具有固定名称"MySql. ...
- MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
转自:https://blog.csdn.net/zhaoqi5705/article/details/12087649?locationNum=15 MySql.Data.MySqlClient.M ...
- MySql.Data.MySqlClient连接MySql
在C#中连接MySql数据库其实是件很简单的事情,但对于刚开始学习C#的朋友来说,问题却是不小,主要原因是相对于ACCESS和MSSql来说,MySql方面的教程文章实在太少,我也是自己摸索好好半天才 ...
- QA:无法为具有固定名称“MySql.Data.MySqlClient”...
Question: 无法为具有固定名称“MySql.Data.MySqlClient”的 ADO.NET 提供程序加载在应用程序配置文件中注册的实体框架提供程序类型“MySql.Data.MySqlC ...
- System.TypeInitializationException: 'The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception.'
下午在调试的时候报错数据库连接就报错我就很纳闷后面用原来的代码写发现还是报错 System.TypeInitializationException: 'The type initializer for ...
- C#工具类MySqlHelper,基于MySql.Data.MySqlClient封装
源码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Syst ...
- 错误 175: 具有固定名称“MySql.Data.MySqlClient”的 ADO.NET 提供程序未在计算
问题描述:错误 175: 具有固定名称“MySql.Data.MySqlClient”的 ADO.NET 提供程序未在计算 原因描述:一.首先我的系统是因为是win10 的有问题,重新装了系统. 二. ...
- 【C#】图解如何添加引用using MySql.Data.MySqlClient;
使用C#连接MySQL时,经常会用到命名空间using MySql.Data.MySqlClient; 这说明VS中没有添加引用,解决方法如下: 1,可点击以下两个链接的其中任何一个,下载MySQL. ...
随机推荐
- 关于select标签曾经踩过的几个坑!
1.情景展示 select标签,是前端开发界面展示,经常需要用到一个标签,看看下面的坑,你中招了吗? 2.坑区展示 踩坑一:option标签没有声明value属性: 没有声明value属性 < ...
- pod update报错(Cocoapods: Failed to connect to GitHub to update the CocoaPods/Specs specs repo)报错解决方案
好长一段时间没动pods,今天偶然需要更新一个库,于是执行了下pod update,然后惊悚的出现了这个报错: [!] Failed to connect to GitHub to update th ...
- C#中DataTable删除多条数据
//一般情况下我们会这么删除 DataTable dt = new DataTable(); for (int i = 0; i < dt.Rows.Count; i++) { if (99 % ...
- 你被R语言的=和<-搞昏了头吗
学习R有一周了,心中一直有一个困惑,关于= 和 <-,今晚决定搞定它! 迄今为止用到最多的函数是matrix() 和c(),就用他们说起! 之前学了四五门语言,对于=赋值已经成了惯性,下面是 ...
- 9.8 翻译系列:数据注解特性之--Required 【EF 6 Code-First系列】
原文链接:https://www.entityframeworktutorial.net/code-first/required-attribute-dataannotations-in-code-f ...
- Selenium:注解@FindBy、@FindBys、@FindAll的用法
方式有3种:@FindBy.@FindBys.@FindAll.下文对3中类型的区别和使用场景进行介绍 1)@FindBy @FindBy(id= "A") private Web ...
- 译:9.使用Redis进行消息传递
本指南引导您完成使用Spring Data Redis发布和订阅通过Redis发送的消息的过程.Messaging with Redis 1. 我们将构建什么? 您将构建一个使用StringRedis ...
- [k8s]k8s pod的4种网络模式最佳实战(externalIPs )
hostPort相当于docker run -p 8081:8080,不用创建svc,因此端口只在容器运行的vm上监听 缺点: 没法多pod负载 $ cat pod-hostport.yaml api ...
- 一篇文章掌握RequireJS常用知识
本文采取循序渐进的方式,从理论到实践,从RequireJS官方API文档中,总结出在使用RequireJS过程中最常用的一些用法,并对文档中不够清晰具体的内容,加以例证和分析,分享给大家供大家参考,具 ...
- 【Java】forward & redirect 的差异
1.从地址栏显示来说 forward是服务器请求资源,服务器直接访问目标地址的URL,把那个URL的响应内容读取过来,然后把这些内容再发给浏览器.浏览器根本不知道服务器发送的内容从哪里来的,所以它的地 ...