Lost contact to localhost database
Posted by: erikdal (---.customers.ownit.se)
Date: August 15, 2023 06:53PM

Hi

After a total reinstall of Windows I had to reinstall WAMP-server a couple of days ago.
I picked up the latest install files from Internet, folloed the instruction how to install it and got it up an running.

It worked fine for a while, but suddenly I can't connect to the local database any more.
I get the message:
Connect Error (2002) Can't create a connection because the target computer actively denied it.

Same error appears when I try to connect via FTP.

How to fix this annoying problem?

Erik

Options: ReplyQuote
Re: Lost contact to localhost database
Posted by: erikdal (---.customers.ownit.se)
Date: August 15, 2023 07:09PM

Hi again

Forgot to add info about my configuration:


Server Configuration

Apache Version:
2.4.54.2 - Documentation Apache
Server Software:
Apache/2.4.54 (Win64) PHP/8.0.26 mod_fcgid/2.3.10-dev - Port defined for Apache: 80
PHP Version:
[Apache module] 8.0.26 - Documentation PHP - Loaded PHP extensions - Use of PHP versions

[FCGI] 7.4.33 - 8.0.26 - 8.1.13 - 8.2.0 - FCGI mode help
MySQL Version:
8.0.31 - Port defined for MySQL: 3306 - default DBMS - Documentation MySQL
MariaDB Version:
10.10.2 - Port defined for MariaDB: 3307 - Documentation MariaDB - MySQL - MariaDB

Erik

Options: ReplyQuote
Re: Lost contact to localhost database
Posted by: Otomatic (Moderator)
Date: August 15, 2023 07:38PM

Hi,
Can you connect to database with PhpMyAdmin ?

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

Options: ReplyQuote
Re: Lost contact to localhost database
Posted by: erikdal (---.customers.ownit.se)
Date: August 15, 2023 10:43PM

Hi again

No, can't connect with PhPMyAdmin.

It gives the same error message. mysqli::real_connect(): (HY000/2002): Det gick inte att göra en anslutning eftersom måldatorn aktivt nekade det.

Erik

Options: ReplyQuote
Re: Lost contact to localhost database
Posted by: erikdal (---.customers.ownit.se)
Date: August 15, 2023 11:11PM

Hi again

Now I can suddenly connect with PhpMyAdmin as well as with my DB tool SQLYog

but still not with WinSCP.

Options: ReplyQuote
Re: Lost contact to localhost FTP
Posted by: erikdal (---.customers.ownit.se)
Date: August 16, 2023 01:39AM

Hi again

I am confused, have been barking up the wrong tree ...

My problem is NOT with the database but connecting to WAMP-server using WinSCP FTP server.

I will try tomorrow to reinstall WinSCP, it's late now ...

Erik

Options: ReplyQuote
Re: Lost contact to localhost FTP
Posted by: Otomatic (Moderator)
Date: August 16, 2023 08:40AM

Hi,

If you want to use the FTP protocol, you'll need to check that you've configured Apache correctly to support it.

Apache FTP Protocol Support

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

Options: ReplyQuote
Re: Lost contact to localhost with FTP
Posted by: erikdal (---.customers.ownit.se)
Date: August 16, 2023 01:27PM

Hi again

I am under the impression that FTP is the default method to communicate with WAMP server local web sites.
Before my reinstall and to start with after the reinstall of WAMPserver I could set up a session on WinSCP and log in to the local web sites.

But then suddenly I cant acees the WAMP-server any more.

I have checked the Apache link you sent to me, but it is far too technical for me. I don't now how to use it.
Is there any type ini-file that controls the behavior? I do have a good text editor.

I hope that you can guide me ...

Erik

Options: ReplyQuote
Re: Lost contact to localhost with FTP
Posted by: Otomatic (Moderator)
Date: August 16, 2023 01:44PM

Hi,

WinSCP is an open source free SFTP client, FTP client, WebDAV client, S3 client and SCP client and file manager for Windows.

Wampserver is a local Apache, PHP, MySQL server that uses the HTTP protocol and absolutely not the FTP protocol.

You create, modify and fine-tune sites or CMS locally with Wampserver and then, once you've got it right, you transfer the local site to the remote site using WinSCP, which are two different pieces of software.

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

Options: ReplyQuote
Re: Lost contact to localhost web sites
Posted by: erikdal (---.customers.ownit.se)
Date: August 16, 2023 02:26PM

Hi again,

Thanks for a swift reply.

OK, still confused . I know that WAMP-server and WinSCP are two diffenrent packages.

But I am tired and confused after many hours of struggelng with the reinstallation.
I agree to have misunderstood the whole issue and now I am dropping it.

Thank you for your patience and underständing!

Options: ReplyQuote
Re: Lost contact to localhost web sites
Posted by: Otomatic (Moderator)
Date: August 16, 2023 03:31PM

Hi,

After a reinstall of Windows, it is mandatory to reinstall VC++ Redistribuables.

- Verify that all VC ++ packages are installed and with the latest versions.
To do this, use the tool:
Checks VC++ packages installed
Do not use a previously loaded tool. Make a new download to make sure you are using the correct version.
To download missing packages, do not rely on Microsoft links, they are not reliable, download packages on http://wampserver.aviatechno.net in section Visual C++ Redistribuable Packages
Do not forget that if you have a 64 bit Windows, you must install both 32 and 64 bit versions of each package.
You must install each package "as an administrator", so right-click the exe file and then run as Administrator.

There is a simply way to do that !
See at the bottom of the page http://wampserver.aviatechno.net :
Best way to install Visual C++ Redistributable Packages


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

Options: ReplyQuote


Sorry, only registered users may post in this forum.