This error comes and goes. I thought I fixed it by changing toe permissions to the SQL folder of the local website to 755 as per a previous post. But on newer versions of Local, it has returned - for some websites and not for others. So I don’t know why mySQL becomes disconnected from your website as you stop the website.