Unable to connect t...
 
Notifications
Clear all

Unable to connect to mysql using php script

10 Posts
3 Users
0 Reactions
2,687 Views
Posts: 9
Topic starter
(@abdel112)
Member
Joined: 6 years ago

For some reason, I'm unable to access the MySQL from a PHP script I just get the remote host actively refused the connection yet I'm able to connect via MySQL workbench.

Things iv done so far.

Opened all ports for MySQL

Checked event viewer for logs nothing seems to show any problems.

Restarted MySQL server

Any ideas?

9 Replies
Posts: 15
 coax
(@coax)
Eminent Member
Joined: 8 years ago

Even though this has nothing to do with SolidCP, you need to enable php_mysql.dll & php_mysqli.dll extensions in php.ini

Either manually or within PHP Manager for IIS.

Reply
Posts: 9
Topic starter
(@abdel112)
Member
Joined: 6 years ago

Even after changing the version to 5.6 from 7 and adding those two extensions I'm still unable to connect to the MySQL server via php. any idea why this is happening.

Reply
Posts: 1509
Admin
(@trobinson)
Noble Member
Joined: 9 years ago

Hello,

Have you checked your my.cnf is not set to bind to a different address?

Thanks,

Trevor

Reply
Posts: 9
Topic starter
(@abdel112)
Member
Joined: 6 years ago

No matter what I do I'm unable to connect to the MySQL server via php just keep getting a connection error.

Reply
Page 1 / 2
Share: