I am using XAMPP server for my php/mysql projects. Today, when I tried to start apache and mysql, mysql failed to open saying "this may be due to a blocked port, missing dependencies, improper privileges...", and my phpmyadmin page says "#2002 - No connection could be made because the target machine actively refused it."
I am nervous because I have an important database there and I cannot open it nor I have a backup of it. I am looking for your valuable comments.
p.s. I have installed Python version 2.7.6 yesterday. Can Python block the default mysql port 3306?
I am on windows 7 os
use
netstat -b -p TCP
to view the process is using port 3306
Related
I have a problem with xampp.. I tried many things but it does not work.
You have already installed MySQL server. You have the mysql server started already and it occupies the 3306 port, so xampp cant use it.
Try:
Stopping the mysql server located at C:\Program Files\MySQL\MySQL Server 5.1\
Uninstall the MySQL server if its not needed
Change port of the MySQL server
My website was working fine till yesterday. But it suddenly started showing this error:
mysql connection error: Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2)
I don't think I made any changes except adding the site to alexa. I googled this and found a lot of resources but all those couldnt help me because I did not fully understand them. I am also not able to locate the file mysql.sock.
I want to know if my website has been hacked. Plus, the solution to the problem.
Might want to start with checking all your db configuration and make sure you did not overwrite or accidentally changed something?
If not that, then try restarting your mysql server. Not sure what Linux env your running, but whichever one it is, Google how to restart mysql.
You could also try and restarting apache. I think the command for that is
sudo service apache2 reload
sudo service apache2 restart
sudo service mysql restart
Then verify if mysql is running on the socket, run this command to see the process
ps aux | grep mysql
this is simple. Run this on commandline
mysql -uroot -p -hlocalhost
sudo service mysql restart
mysql -u root -p
I hope that works.
I have latest version of wamp i.e WAMPSERVER (64 bit & PHP 5.5) 2.5 installed. It's not starting completely, not turning to green and so MySQL is not starting even though the port is used by Apache itself.
I have also installed Visual Studio 2012 VC 11 vcredist_x64/86.exe for my Windows 8.1 64bit OS.
Very weird, all the paths are configured in paths and also extensions enabled.
Below image specifies the sufficient ports in use:
#RiggsFolly - Thanks for the neat explanation. As per your questionnaires, I wanted to confirm that I have just installed 64 bit Wamp version and not 32bit. But installed Visual Studio 2012 VC 11 vcredist_x64 and x86 thinking.
FYI: As I had stated earlier in my question I have installed MySQL_Workbench in my system. But i have disabled its services to run on startup. May I know is that causing problem?
Please find the image of errors as per the MySQL Errors logs
And please find this for windows application MySQL error logs
My last question is: can't we have both MySQL_Workbench & Wamp together?
after you installed vcredist_x64/86.exe ,
you need to reinstall the wampserver. because the instalation of mysql services are not completed without vcredist_x64/86.exe and runtime
Your first image, I assume is the result of running
wampmanager -> Apache -> Test port 80
This tests the port that Apache should be using i.e. port 80. It should report
Your port 80 is not actually used.
But only if you have not started Apache!!! If you have started the Apache service in WAMPServer, it will of course report that port 80 is being used by Apache 2.4.9 etc etc...
This looks like what you have done! So its not a problem.
One thing though You say you installed WAMPServer 64bit, but the image reports that Apache 32bit is running ??? What do you really have installed ??? Or do you have both 32bit and 64bit WAMPServer installed?
If you have installed both 32bit and 64bit I suggest that you pick one or the other. I suggest the 32bit WAMPServer as the 64bit PHP is still not a complete port and considered Experimental until PHP7.
Now you appear to be saying already that the reason the wampmanager icon is not green is that MySQL has not started, so all the above is irrelevant. MYSQL runs on port 3306 and not 80, only one program can use a port, they cannot share ports.
So to see why MySQL has not started, look at the MySQL error log.
wampmanager -> MYSQL -> Error log
If that is empty, as it is sometimes if the error is so serious that MYSQL has not had time to open its log file before the error causes it to terminate, look at the Windows Event Log
To launch Windows Event Viewer do :
Windows Key + R to launch the run dialog
then enter eventvwr.exe and press the OK button
On the left side of the windows click 'Windows Logs -> Applications'
Look for the names 'Apache Service' or 'MySQL' in the Source column which have a error symbol in the first column.
The error messages in here are normally very descriptive and will normally lead you to a speciic line number in the my.ini file where the error exists. Alternatively, they will idedntify what the issue is.
Reply to additional info
Your MySQL error log is basically saying that it cannot start MYSQL as something is already listening on port 3306 (3306 is the default MYSQL port). Almost definitely the MySQL Server that you installed with the Workbench.
I see the installer for "MYSQL Workbench" has changed since I installed "MYSQL Workbench". I expect you chose to install MYSQL Workbench and a MySQL Server. As you have MYSQL Server installed with WAMPServer, can I suggest that you uninstall "MYSQL Workbench" or at least the "MYSQL Server" that came with workbench. This should stop the other MYSQL Server from getting port 3306 before the MYSQL Server installed with WAMPServer.
Remember to backup any databases that you may have created before uninstalling.
You can then install "MYSQL Workbench" again after WAMPServer starts working and this time dont install another instance of MYSQL Server.
Hello guys is me again now I have some problems configuring LAMP
first of all i have install everything but I cant run test.php to see if php works according to ifconfig command my addr is: 192.168.1.77 So in browser when I try to run 192.168.1.77/test.php nothing happens.I follow the instructions in this video to do that. How to set up a Debian LAMP Server
Second when I try to change the password on mysql I got this error by the way I can't do anything that has to do with mysql. when I run this command apache2 -v && mysql -v && php -v
I got this error.
Server version: Apache/2.2.22 (Debian) Server built: Feb 1 2014
21:26:04 ERROR 2002 (HY000): Can't connect to local MySQL server
through socket '/var/run/mysqld/mysqld.sock' (2)
when I try to run this command /usr/bin/mysqladmin -u root password 'mypassword' i got this error.
/usr/bin/mysqladmin: connect to server at 'localhost' failed error:
'Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and
that the socket: '/var/run/mysqld/mysqld.sock' exists!
I follow this guide to LAMP, Linux Apache MySQL PHP But since I have those problems with mysql i can't finish the proper configuration. so thank you very much for any help or comments have and have a nice day.
Doing a quick search might be able to point you the right direction, did you install this?
apt-get install mysql-server
It seems to be complaining about mysqld which is the mysql-server program perhaps try this too:
service mysql start
You will see this:
[ ok ] Starting MySQL database server: mysqld ..
[info] Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
Notice how it says mysqld
If that doesn't work try this maybe:
apt-get install --reinstall mysql-server
Hopefully this helps a bit
Kali blacklists services by default using sysvinit, so if you've been rebooting it could be tripping you up:
http://docs.kali.org/policy/kali-linux-network-service-policies
I have updated my XAMPP version to 1.8.2. Now I have the problem that the MySQL Database-server won't start.
If I try to start the Apache Web Server (in 'Application manager'), it says "starting..." and after a few seconds it says "Running". When I do the same thing with the MySQL Database, it says "starting..." for a few seconds and then it says "Stopped".
When I look at the config file (my.cnf), I see this:
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
I think the problem is in the socket. mysql.sock does not exist in that directory and not even in the whole XAMPP-directory.
Does anyone know how to fix this?
PS: I have PHP 5.4 installed on OS X.
i had experienced the same error on Mac OS X (10.9) Mavericks i fixed by following these steps
Open terminal and use sudo su
Run ps aux | grep mysql
Kill all process using kill -9 PROCESS_ID
Start your MySQL using control panel
Port 3306 might be used by other process, Can just change the Port number in Xampp mysql configuration and start the mysql.
I had the same experience with xampp but I wasn't performing an update, this was a clean install. I have had good luck running MAMP right out of the box. This isn't exactly a direct answer to your problem, but if you just wanted to install something and get work done, MAMP could be an option. I did a couple of hours of googling and I still haven't figured out the xampp issue here...