This issue has me a bit caught off guard. I've just set up this LAMP server and everything appears to be working well until I try running some of my PHP that communicates with the MySQL server.
Lost connection to MySQL server at 'reading initial communication packet', system error: 0
So obviously the MySQL server won't talk to PHP for some reason. I go ahead and connect to it with MySQL client, and have no issues whatsoever logging in and doing queries. I take a look at the systemctl for MySQL and find that it's purposely denying the connection for some reason.
vultr.guest systemd[1]: Started MySQL Community Server.
vultr.guest mysqld[17740]: warning: cannot open /etc/hosts.allow: Permission denied
vultr.guest mysqld[17740]: warning: cannot open /etc/hosts.deny: Permission denied
vultr.guest mysqld[17740]: refused connect from ::1
Right. So I check the hosts files and their permissions are set to 774, which realistically shouldn't pose any issue. I up the permission to 777 for sake of science and it doesn't seem to make any difference. At this point I'm somewhat at a standstill as I can't find any other leads as to what might be the issue. For the most part all of the configuration is default for PHP and MySQL at the moment, so I honestly can't think of any potential discrepancies arising from their configuration. Anyone willing to share their thoughts on this?