Page 1 of 1

PHP not able to connect to MySQL

Posted: Sun Jun 18, 2017 10:20 pm
by sunnymaggie
Installed Apache, PHP and MySQL in Windows 10, all working fine and running.

But, when testing PHP to connect to MySQL (using mysqli and PDO), both aren't working.

Checked phpinfo, there have mysqlnd installed.

Please help, thanks!

Re: PHP not able to connect to MySQL

Posted: Mon Jun 19, 2017 6:57 pm
by Christopher
Are the user and password correct? Do they have permissions to access the database?

Re: PHP not able to connect to MySQL

Posted: Tue Jun 27, 2017 11:41 am
by sunnymaggie
Reformat windows, now phpinfo shown mysql, mysql and mysqlnd installed, everything is working fine now.

Re: PHP not able to connect to MySQL

Posted: Tue Jun 27, 2017 7:57 pm
by Christopher
sunnymaggie wrote:Reformat windows
Ahhhhh ... of course!