The project connects to the database fine when I run it in Visual Studio. When I try to publish it I get this error:
Error 34 Web deployment task failed. (Cannot connect to the database 'myAppDb'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CANNOT_CONNECT_TO_DATABASE.)
Cannot connect to the database 'myAppDb'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CANNOT_CONNECT_TO_DATABASE. Object of type 'dbDacFx' and path 'server=localhost;user id=root;database=myAppDb' cannot be created. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) The system cannot find the file specified C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets 55 5 myProject
I've tried different connectionstrings for MySQL using connectionstrings.com. What's going on here?
This problem was solved by installing a MySQL connector: https://dev.mysql.com/downloads/connector/net/6.9.html