I am currently using the community library step template (https://library.octopusdeploy.com/step-template/actiontemplate-run-entity-framework-migrations-(update-database)) to perform my Entity Framework migrations against MySQL databases, this has worked perfectly fine until we tried to promote our software to our production environment where I get the error
Executing: & “C:\Program Files\EntityFramework\tools\migrate.exe” “PC.Radix.Contract.DataContexts.EntityFramework.dll” /connectionString=“server=servername;database=contract;persistsecurityinfo=True;user id=myuser;password=mypassword;” /connectionProviderName=“System.Data.SqlClient” /startupConfigurationFile=“C:\Octopus\Applications\Production\PC.Radix.Contract.Service\0.0.6176.18602\web.config” /startUpDirectory=“C:\Octopus\Applications\Production\PC.Radix.Contract.Service\0.0.6176.18602\bin” /Verbose
System.Data.Entity.Core.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. —> MySql.Data.MySqlClient.MySqlException: Authentication to host ‘server’ for user ‘myuser’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘myuser’@‘111.111.111.111’ (using password: YES) —> MySql.Data.MySqlClient.MySqlException: Access denied for user ‘myuser’@‘111.111.111.111’ (using password: YES)
However if i run the generated command in in elevated command prompt the migration completes successfully.
The only difference from our working environments and the production is the production environment is using MySQL running under Amazon RDS.
The operating system is Windows 2012 Server R2.
If anyone has any suggestions on this it would be most appreciated.
Regards,
Stuart Ferguson