mysql error while starting service from services.msc - php

I have installed XAMPP server in my C: drive.When i start apache service from control panel it starts successfully but when i start mysql service it freezes and does not start the service. I tried to start the service using services.msc it says the following error
The mysql service failed to start due to the following error: The system cannot find the file specified.
Anu Suggestions or help please i am stuck here.

I had the same problem do you have Skype on your computer try to change the port of Skype to another no or what you can do is install xampp in d drive and it will work cause some application is stopping it to work in c drive .
Hopefully this helps

As long as you can start it through the XAMPP control panel, I don't think you even need to worry about starting it through services. With MySQL running (after having started it through XAMPP), open a command prompt, and type this line:
mysql -uroot -p -P3306 -h127.0.0.1
If it appears to connect to MySQL, you're good.

Related

phpMyAdmin unable to connect with mysql

I had installed MAMP on my windows 10 machine. I had then configured the MySQL thru the phpMyAdmin and had installed the WordPress. Later due to certain issues, I had to un-install and re-install the MAMP again. This time Apache started running and I could reach localhost/MAMP/, but when I click on phpMyAdmin, I get the message:
"mysqli_real_connect(): (HY000/2002) No connection could be made
because the target machine actively refused it
.....You should check the host, user name and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server". I ran the command> MySQL -u root -p status. It asked for a password. On giving the password, I got the following: Error 2003 (HY000) Can't connect to MySQL server on localhost (10061).
Please help with a workaround.
The error was resolved thru re-installation and taking care to disable the installation of MAMP Pro which happens by default.
I usually see the "actively refused" error when I try to connect to a port that the MySQL server is not actually running on. That said, I don't know why this would happen out of the blue. Maybe you should be using WAMP instead of MAMP?
You could probably troubleshoot this issue remotely with third party tools that have debug logging (MySQLShell through its Application Log)
Check all your Microsoft Redistribute Packages are installed correctly. If the problem exist then use the XAMPP or WAMP for the Windows because MAMP is generally used for the MAC OS.

Start PHPmyAdmin from putty - Server is remote

Bit stuck here, I have looked on here, for similar, but cant find what I need.
Have looked at how to start PHPmyAdmin via putty on here.
I have a server, which is on a network. I log into the network via Putty.
The database usual access is for example 10.32.187.100/m . This is how I used to access it before the server reboot.
I have had to restart the server. But I cannot log into the database as I believe I have to turn it on.
As it is not on a local machine I do not know how. It is a linux server, and the location of ‘m’ is /var/www/html
In ‘m’ are the files for phpmyAdmin.
Nothing has been over written. The server had to restart. Hence why I need to start up PHPmyAdmin.
Can I ask how do I turn on PHPmyAdmin via putty I the method I need to use?
try this
sudo service mysql start
sudo service apache2 start

Unable to access MySql db

I have been working on php for some time. I have cloned a git repo yesterday. Just after that i am able to connect to MySQL server, access MySQL db and phpmyadmin properly. Today, I started the server and tried to access phpmyadmin from xampp control panel, as soon as I try to open it, apache port is changing automatically to 49868 and mysql connection terminates.Then, again apache changes its ports to previous states.
Any help is appreciated. Thanks in advance.
EDIT : I reinstalled everything and it worked.
Check if another application is using port 80.
In command prompt use:
netstat -aon | findstr :80
enter image description here
If windows verify if in task manager is already running XAMPP.

Xampp Apache module not working - 'waiting for localhost' error

I have encountered a problem when trying to preview PHP files using the Xampp control panel Apache module. Basically I open the control panel, click 'start', and have it minimised on my screen. I then navigate to a PHP page that I want to preview in my browser - but when I try to load it, it just sits there and says 'Waiting for Localhost' on the tab. The page never loads. Has anyone ever encountered this problem before, and if so, is there a simple fix?
Regards,
Robert Young
This happened to me and the problem was that some other application was listening on port 80. I couldn't figure out what it was. Usually, it would be Skype so I shut down Skype and I still had a problem connecting to localhost. The other application was Audible Download Manager which automatically starts when I start windows and you can usually see in the windows task manager. Once I closed the app, localhost started working.
This is how you figure out which application is listening on port 80.
Go to Start, then Run or type cmd and open cmd.exe. Then type:
cd desktop
netstat -a -b -p TCP >port_list.txt
After command runs, port_list.txt will be saved on your desktop. Open port_list.txt and go through the list and find the application listening to :http. Then find the application under processes in your windows task manager and end the process.
I had similar issue... Here is what you can do:
Step 1: on xampp control panel checkout netstat & look if any other application is using that port as your xampp
( If yes then shut down those applications using Task Manager)
Step 2: Irrespective of Positive or negative results of step 1, Just Turn off your firewall through control panel.
In my case I just had to turn firewall off & it did the miracle.

XAMPP Apache and MySQL services not starting or stopping after first installation

Hi I want to start learning PHP and MySql and also polish my knowledge of Javascript witch is very limited at the moment having only use jQuery and knowing only the core sintax of the language.I choose to read Learning PHP MySQL and Javascript witch seemed to fit all my needs.
Having always had bad luck when installing something new I immediately hit a dead end with XAMPP 1.7.7.
The server runs corectly when is first installed and I can stop MySQL and Apache from running from the control panel.But if close the control panel and reopen it I get and error.
If when it was first opened I left apache and Mysql opened I get the error Apache Service not stopped [-1] the same goes for MySQL.If the services were close I get the same error that says apache service can't start same for MySQL.
I have tryed multiple instalations and the same thing happens.
I first tought I will install it and live them open so I can start working but sadly it didn't work corectly or I don't know how to run a PHP script corectly.
Here's what I did:
I opened PHPStorm and pasted this little scripped with a PHP extension :
<?php
echo "Hello world";
?>
After that I tried to run it but I get the error "PHP interpretor is not installed".
Shouldn't it have worked if the apache server was running?
You should wait after you stopped apache or mysql to let them clean things up. If you want to force them to end their processes, you can kill httpd.exe and mysqld.exe from task manager and then try starting it from xampp control panel.
Could it be that you are running Skype on the same machine? Its a known issue where Skype takes control over port 80 in order to become a supernode in the Skype network.
Go to Skype and in the "Tools" menu locate subsection "Advanced", option "Connection". There you'll find an option saying "Use port 80 and 443 as alternatives for incoming connections". Uncheck it, click "Save" and try restarting your server.
What OS are you using? Are you using the XAMPP control panel?
In windows press
Start
Run
Type "Services.msc"
Find the "Apache" service
Right click and stop
I find i get this error if i start the apache service without the control panel but try to stop it with the control panel.

Categories