Page 1 of 1

XAMPP MYSQL and Apache problem

PostPosted: 07. December 2008 17:25
by Batric
Hi to everyone :D

I downloaded and installed XAMPP from the internet in order to view some of the PHP sites on my local machine.

But there is a problem:
-during installation, the wizard asked me if I would like to install Apache and MySQL as services. I choosed both. The rest of the installation went ok, but when it started the xampp console error message appeared:
"Ports 80 or 443 (SSL) already in use! Installing Apache2-2 service failed!"
then
"Port 3306 already in use! Installing MySQL service failed!"

And when I open XAMPP control panel application and click start (MySQL) it says: "ERROR: MySql service not started [-1]

I managed to open the localhost and I created a sample file just to ensure everything is ok, but when I tried to open a website with MySQL database, again error text appeared:
"Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mysql2.namesco.net' (10060) in DISK:\www\htdocs\xampp\sitename\dbc.php on line 8
I cannot connect to the database because: Can't connect to MySQL server on 'mysql2.namesco.net' (10060)"

Any ideas?

Thanks in any case :D

Batric

Re: XAMPP MYSQL and Apache problem

PostPosted: 08. December 2008 00:55
by Sharley
Batric wrote:...but when it started the xampp console error message appeared:
"Ports 80 or 443 (SSL) already in use! Installing Apache2-2 service failed!"
then
"Port 3306 already in use! Installing MySQL service failed!"...
After stopping all XAMPP components, also un-tick any Svc boxes in XAMPP Control Panel (XCP), double click on (right click and Run as Administrator if Vista) .\xampp\xampp-portcheck.exe and see what is using those ports that XAMPP requires exclusively - all ports should be Free

The 2 main culprits are the Windows Server (IIS - Internet Information Server - disable in the Windows Control Panel) and or Skype (change port in Tools>Options).

Check using Task Manager (right click on the Task Bar and select Task Manager then the Processes tab) for any apache and mysql files running - if so highlight the file and select End process then OK - repeat till all apache and mysql processes have been ended

Now try again to start the XAMPP components in the XCP - but don't start as a service (don't tick the Svc boxes) unless you want to always have apache and mysql start when you boot your PC.