connect to mysql using php

I installed the latest versions of apache, php and mysql on windows 10.  I am trying to connect to mysql for the first time within php and the code simply stops, i.e. there is no error message, and it will not proceed to the line below the following statement.

$connection = new mysqli('localhost','root','password', '');

Do I need to start mysql after installing it, if so, how do I do that?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shafer23Author Commented:
To follow up, mysql is running when I view the task manager, so that does not seem to be the issue.  note, I ran into this problem a few years ago, and I implemented the below solution (which I have also done this time around, but it is still not connecting).

To allow php to connect with mysql in windows, change the hosts file that is located within the below directory:
uncomment the below line:  localhost   (to do so, type note pad within the startpanel search bar, choose run as administrator, and then open the file).

Thanks again for any thoughts
shafer23Author Commented:
I implemented the development version of the php.ini file and it returned the below message:
Fatal error: Uncaught Error: Class 'mysqli' not found

As such, I implemented the below lines within the php.ini file and it resolved the issue:
extension_dir = "c:\php\ext"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.