php can't connect to MySQL

A

Anonymous

Guest
Installed Apache 2.4, PHP 5.6, MySQL 5.7 successfully.

But, php can't connect to MySQL (tested both mysqli and PDO), both not working.

phpinfo page shown mysqlnd installed.

please help.
 
Have you created a database?

Would suggest to only use pdo to connect to database as MySQL functions are deprecated and will not work in php 7, (MySQL will still be used, but connect through PDO).

Please post code using the </> button in the post a reply box.
 
Reformat windows, now phpinfo shown mysql, mysqli, and mysqlnd installed. Everything is working fine now.
 
Back
Top