I've installed Linux (Mint) & LAMP but
mysql_connect('localhost', 'user', 'password')
fails no matter what I try.
I spend at least 6 hours trying to fix it.
phpinfo()
is working
sudo mysql -u user -p
works
sudo ufw status
Status: active
To Action From
-- ------ ----
Apache Full ALLOW Anywhere
3306 ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
3306 (v6) ALLOW Anywhere (v6
What else can I try? How do I debug? I've been googling for hours. The only non-standard thing is that I've installed php 5.6, since I need it, "php -v" returns:
PHP 5.6.40-30+ubuntu20.04.1+deb.sury.org+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologie