Mysql not conecting from PHP page
Posted by: harini (49.37.204.---)
Date: April 14, 2020 06:40PM

1 - Windows version used -Windows 10 64 bit
2 - Version WampServer WAMP3.2.0 64 bit
3 - Apache Version 2.4.41
4 - PHP Version 7.3.12
5 - MySQL Version 5.7.28
5a - MariaDB version if applicable) - no
6 - What color is the WampServer icon (in the notification area - green color


I have installed WAMP inn my system . I am not able to connect mysql from php . The error it says is !No connection could be made because the target machine actively refused it.".

edited to add i am able to access the same from localhost\phpmyadmin .

The port for mysql in my system is 3308 .. is that an issue ? if yes how do i change the same ?



Thanks in advance !



Edited 2 time(s). Last edit at 04/14/2020 06:48PM by harini.

Options: ReplyQuote
Re: Mysql not conecting from PHP page
Posted by: Otomatic (Moderator)
Date: April 14, 2020 07:01PM

Hi,

> The port for mysql in my system is 3308
Because you disabled MariaDB that was installed and you did it without reading the document that was recommended to read at the end of the installation of Wampserver.
You are lucky, you can still read it :
Right-click Wampmanager icon -> Help -> MariaDB - MySQL

To save you from reading fatigue
Right-Click -> Tools -> Use a port other than 3308 and choose 3306

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Mysql not conecting from PHP page
Posted by: harini (49.37.204.---)
Date: April 14, 2020 07:05PM

I changed the port number from 3308 to 3306 for sql and the error went of .. thanks

Options: ReplyQuote
Re: Mysql not conecting from PHP page
Posted by: Otomatic (Moderator)
Date: April 14, 2020 07:12PM

Hi,

> the error went of .. thanks
Don't let that stop you from reading the document, it will allow you to understand why now "it works!" and understanding is learning.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.