I was bitten by mosquitoes last night, and I didn’t sleep all night. In the morning, I thought I would work, but Xampp had a problem.
MySQL stops automatically after a few seconds of startup.
It may be that Xampp was not exited due to the hasty shutdown last night, resulting in an unknown problem with the database.
Watch this video, this is the only one that really solved my problem.
Your WordPress may show warning info like this. To solve this bug, just restart your Xampp.
Warning: mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine….