i have installed Linux Mint 18.1, then LAMP server using the command
sudo apt-get install lamp-server^
, for testing i tried to create a script connecting to MYSQL database, just like the following.
<?php
$h = "localhost";
$u = "root";
$p = "password";
$conn = mysql_connect($h,$u,$p);
echo "test";
?>
when i remove the line $conn = mysql_connect($h,$u,$p);
the script works fine, otherwise it isn't running,
php5.6-mysql
is already installed , and i also tried to connect using
mysqli_connect()
instead of mysql_connect()
i don't know what's wrong ?!