none
Difficulty connecting az webapp and az for mysql server RRS feed

  • Question

  • just as the subject line points to, I have trouble connecting my webapp and my mysql server 

    I get the following error message 

    I have tried changing my connection string, checked the box to allow connection between azure services and so on.

    are there any big brains who can and want to help ? 

    much appreciated 

    Server Error in '/' Application.

    Access denied for user 'P3AauAdmin'@'40.115.125.191' (using password: YES)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: MySql.Data.MySqlClient.MySqlException: Access denied for user 'P3AauAdmin'@'40.115.125.191' (using password: YES)

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:
    [MySqlException (0x80004005): Access denied for user 'P3AauAdmin'@'40.115.125.191' (using password: YES)]
       MySql.Data.MySqlClient.MySqlStream.ReadPacket() +309
       MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket() +39
    
    [MySqlException (0x80004005): Authentication to host 'createjamserver.mysql.database.azure.com' for user 'P3AauAdmin@createjamserver' using method 'mysql_native_password' failed with message: Access denied for user 'P3AauAdmin'@'40.115.125.191' (using password: YES)]
       MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex) +177
       MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket() +64
       MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ContinueAuthentication(Byte[] data) +109
       MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.HandleAuthChange(MySqlPacket packet) +163
       MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset) +531
       MySql.Data.MySqlClient.NativeDriver.Authenticate(String authMethod, Boolean reset) +71
       MySql.Data.MySqlClient.NativeDriver.Open() +780
       MySql.Data.MySqlClient.Driver.Open() +50
       MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +225
       MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() +11
       MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +286
       MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +93
       MySql.Data.MySqlClient.MySqlPool.GetConnection() +65
       MySql.Data.MySqlClient.MySqlConnection.Open() +984
       P3.Controllers.HomeController.Showcase() in C:\Users\Bruger\OneDrive\Documents\Github gut\P3-Fisk\P3\P3\Controllers\HomeController.cs:144
       lambda_method(Closure , ControllerBase , Object[] ) +62
       System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +169
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
       System.Web.Mvc.Async.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
       System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
       System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__11_0() +50
       System.Web.Mvc.Async.<>c__DisplayClass11_1.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +228
       System.Web.Mvc.Async.<>c__DisplayClass7_0.<BeginInvokeActionMethodWithFilters>b__1(IAsyncResult asyncResult) +10
       System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
       System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__3() +35
       System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__5(IAsyncResult asyncResult) +100
       System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
       System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +11
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +45
       System.Web.Mvc.<>c.<BeginExecute>b__151_2(IAsyncResult asyncResult, Controller controller) +13
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +28
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9873649
       System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159
    

    Thursday, November 14, 2019 12:31 PM

Answers

  • Hi my big brain friend solved it

    It was an issue with the connection string in which someone in the project had sneaked some bracec {} around the password and the database name which i guess must have denied us access to the database

    thanks for the suggestions they are much apppreciated

    Best Regards Gh057ly :)

    • Marked as answer by Gh057ly Thursday, November 14, 2019 1:44 PM
    Thursday, November 14, 2019 1:43 PM

All replies

  • Hi Gh057ly,

    did you validate that the user that you are using has permissions to the mysql? It seems that the user doesn't have permissions.

    regards!

    Thursday, November 14, 2019 1:33 PM
  • Hi my big brain friend solved it

    It was an issue with the connection string in which someone in the project had sneaked some bracec {} around the password and the database name which i guess must have denied us access to the database

    thanks for the suggestions they are much apppreciated

    Best Regards Gh057ly :)

    • Marked as answer by Gh057ly Thursday, November 14, 2019 1:44 PM
    Thursday, November 14, 2019 1:43 PM