PHP not able to connect to MySQL

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
sunnymaggie
Forum Newbie
Posts: 2
Joined: Sun Jun 18, 2017 10:12 pm

PHP not able to connect to MySQL

Post 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!
User avatar
Christopher
Site Administrator
Posts: 13592
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP not able to connect to MySQL

Post by Christopher »

Are the user and password correct? Do they have permissions to access the database?
(#10850)
sunnymaggie
Forum Newbie
Posts: 2
Joined: Sun Jun 18, 2017 10:12 pm

Re: PHP not able to connect to MySQL

Post by sunnymaggie »

Reformat windows, now phpinfo shown mysql, mysql and mysqlnd installed, everything is working fine now.
User avatar
Christopher
Site Administrator
Posts: 13592
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP not able to connect to MySQL

Post by Christopher »

sunnymaggie wrote:Reformat windows
Ahhhhh ... of course!
(#10850)
Post Reply