“/”应用程序中的服务器错误。

Access denied for user 'root'@'localhost' (using password: YES)

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: MySql.Data.MySqlClient.MySqlException: Access denied for user 'root'@'localhost' (using password: YES)

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[MySqlException (0x80004005): Access denied for user 'root'@'localhost' (using password: YES)]
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +385
   MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket() +39

[MySqlException (0x80004005): Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: YES)]
   MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex) +215
   MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket() +108
   MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset) +382
   MySql.Data.MySqlClient.NativeDriver.Open() +871
   MySql.Data.MySqlClient.Driver.Open() +36
   MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +311
   MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() +18
   MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +300
   MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +151
   MySql.Data.MySqlClient.MySqlPool.GetConnection() +57
   MySql.Data.MySqlClient.MySqlConnection.Open() +1259
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +98
   System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) +431
   System.Data.Entity.Core.EntityClient.EntityConnection.Open() +308

[EntityException: 基础提供程序在 Open 上失败。]
   Himall.Web.Areas.Web.Controllers.SearchController.SearchAd(String keywords, Int64 cid, Int64 b_id, String a_id, Int32 orderKey, Int32 orderType, Int32 pageNo, Int32 pageSize) +4940
   lambda_method(Closure , ControllerBase , Object[] ) +575
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +204
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +71
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +37
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +385
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +385
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +37
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +30
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +185
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +33
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +67
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +47
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +33
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +67
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +33
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +607
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.2114.0