The problem is the Integrated Security=True setting in your connection string. Application uses the window login.
1. Grant the ASPNET user the required access rights on your databathense
The problem is fixed by creating the user in mysql database or allow existing user with permissions.
Once the user is created then you can assigned that user to your published folder.
When your source code will run from that folder then user has the permission to access the MySql database.
Login failed for user in Sql database
• Login failed for user 'NT AUTHORITY\S...
Deploy worker service on local machine
• Host Background Job Locally on Window...