So I have a simple PHP script which I attempted to do something along the lines:
$db = mysqli_connect("localhost", "root", "PASSWORD HERE", "database name"); mysqli_query($db, "SELECT STATEMENT HERE") or die (mysqli_error($db));
to try something out. But it won't make a connection to the database. The script is working fine as I tried it on a homeserver and so on, but it won't work on the vps, so I know it's that the mysql server is screwed up.
I'm using Debian 7. I used
apt-get install apache2 apt-get install mysql-server mysql-client apt-get install php5 apt-get install phpmyadmin
and a bunch of php-* (* = different modules or whatever)
mysql -u root -p
and then wrote in the password, and it worked. So what could be wrong?