We are setting up a new server to handle some of the services of our site.
And the Mysql connection is not working via Php which works fine from our other (older) sites.
Fyi,
1- on new server we have: PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
2- on old we have: PHP 5.3.3
3- We have checked that mysql access is working fine on new server via:
mysql -u root -p
but when trying to connect to Mysql via php via either of these commands, it is not connecting:
$con = @mysql_connect(‘localhost’, ‘root’, ‘xyz123’); {from other older servers}
and also tried this:
$con = mysqli_connect(‘localhost’, ‘root’, ‘xyz123’);
And have checked the php.ini and Mysql related connections are there
What to do to fix this please?
Thanks