I am getting following error when I test mysql port 3306:
***** Test which uses port 3306 *****
===== Tested by command netstat filtered on port 3306 =====
Port 3306 is not found associated with TCP protocol
Port 3306 is not found associated with TCP protocol
--- Do you want to copy the results into Clipboard?
--- Type 'y' to confirm - Press ENTER to continue...
I've tried many methods but it could not work. Apache is working fine but MySQL service is not able to start. Wamp icon is orange and showing only 1 of 3 services running.
I have tried all points mentioned in MySQL service not starting on WAMP?
After so much exploring, it is rectified now. The my.ini file inside the Windows folder was the real problem. It is conflicting with the WAMP mysql my.ini. Now it is working fine after deleting that file from the Windows folder.
after lots of struggling, I found the solution in this answer
for me, the reason for this issue was the wrong config data was cached for mysql so did this:
I tried going to: C:\wamp64\bin\mysql\mysql5.7.24\data and deleted the
following:
auto.cnf, xxxxxxxxx.err, xxxxxxxxx.pid, ib_logfile0 and ib_logfile1
But I left the ibdata1 alone as it references all local databases.(dont delete that at all!) I
then restarted wamp and it worked like a charm.
Delete the my.ini file inside the folder work
Go to cmd and run 'netstat /a' to get a list of all the ports running.
Check to see if TCP 0.0.0.0:3006 is on the list. On mine, it was not and 0.0.0.0:3008 was on the list instead.
To verify the database is in fact running:
Change directory to the folder holding the mysql version I expected to be running. Then I attempted to login with command line to the mysql database I instantiated with phpMyAdmin... using 'mysql -u yourloginId -p yourDataBaseName'
Hit enter and then enter your pass word. If you did not setup a password... skip the '-p'.
If you database is running you'll get a bunch of info related to it and changes the prompt to 'mysql'.... type in 'quit' and hit enter to exit out. Then you are done with cmd.
Since the database is running and WAMP is using ports in the 3000 range, then I assumed that 3008 is the correct port. Go to the WAMP icon click on it... go to php then php.ini and edit it. Do a find on 3006... and you will likely find it as mysql port... change it to the port actually running mysql... for me it was 3008. Save it and restart WAMP... Issue should be resolved.
going to C:\wamp64\bin\mysql*yourmysqlversion* you should find my.ini
After deleting that file you should be fine. Be sure to use your Wamp testing tools in wamp settings to test the ports for Mysql/Maria DB and Apache. Microsoft IIS is a common culprit for not making all services run.
Related
All of a sudden I am encountering this problem on my mac. I cant start my MySQL Database. I can only start my ProFTPD and Apache Web Server.
This is the application log:
Starting all servers...
Starting MySQL Database...
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting ProFTPD...
Checking syntax of configuration file
/Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd started
I have even did some research through stackoverflow. First i tried to end the process through my activity monitor by i couldnt find the keyword sql on the filter search area. The second method i tried was adding the unset DYLD_LIBRARY_PATH
but that didnt even worked for me.
Can i know how to solve this problem. Helps would be really appreciated. Thank you
#1. Open XAMPP Installation Directory
#2. Open "etc" Folder
#3. Find "my.cnf" file and open it in any text editor
#4. Change Port from 3306 to 3307 (if you have installed skype or other apps)
#5. Add "innodb_force_recovery=1" under "myisam_sort_buffer_size=8M"
#6. Save "my.cnf" file
#7. Restart Mysql Server By Your Terminal by command:
"sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start"
You Get A message "Starting MySQL SUCCESS! "
For me, Xampp Control panel was not launching, and in Stackoverflow some where it was mentioned to add Read / Write for every one on every file of xampp, when I did that. It allowed me to launch xampp control panel but mysql was not starting.
Later I debuged and found that /Applications/XAMPP/xamppfiles/etc/my.cnf should not be writeable by everyone, mysql will ignore my.cnf if it is for everyone. I changed the permission to read only for this file, and able to start mysql server
I just solve the answer by going to the activity monitor and search for sql under all process and terminate it. then i restart my mac and now my sql database is working great for me.
I Know this post was originally posted last year, but I just had the same problem and I found the solution for me. So here it is, just in case this can help somebody else.
I tried all the suggestions I found online, including trying to terminate MySQL on the activity monitor, but then I realized that when you download/upgrade XAMPP - MySQL, the option to automatically start MySQLserver on Startup is ON. You need to turn it off. Here is what you do:
Go System Preferences and click on the Mysql icon, You should get this window:
Uncheck that option. You will be asked for your password. After you are done with that, restart your computer and the problem should be fixed.
I hope that help somebody who is as confused as I was. lol ✌🏼
Xampp Control Panel> Manage Server> Mysql Database > Configure > change the port from 3306 to 3307
At least it worked for me in mac.
For me using macOS Catalina, I had to delete this 2 files then quit and restart the manager-osx:
MyName-MacBook-Pro.local.err
tc.log
The folder path is this: /Applications/XAMPP/xamppfiles/var
Note: the 2 files were automatically regenerated after I start and Apache and MySQL
If mysql is not starting in xampp, it might be a port conflict issue. Mysql run by default on port 3306. you need to check if another application is occupying that port. use following command to check app occupying a port
lsof -nP -i4TCP:3306
if you find an application occupying that port, stop the application and restart xampp. As an alternative, you can go to php.ini file or click configure in the dropdown and change the mysql port to 3307
I spent whole day trying to resolve this issue. Changing the port no from 3306 to 3307 worked for me. Simply open the configure module and change the port number. Hope it works for you.
In case this may help. I followed all the steps above still nothing worked for me. And I follow this article MySQL database won't start in xampp and it worked. what is says is:
Steps
Open terminal and type
sudo su
and then put in your password
Then type
ps aux | grep mysql
You will need to get the process id of mysql. There should be number near the top, something like 739 or 8827 (in my case I got 74689, just look after mysql or _mysql process id)
Kill the process using
kill -9 {process id}
this should look something like this: kill -9 739
Restart MySQL in manager-osx
If any of the above don’t work, This should work:
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
I tried the suggested solutions above however none worked for me. So I uninstalled XAMPP and then reinstalled it and so now MySQL server starts up ok.
First things first, when I open and run XAMPP this shows up
The issue is, when I try and open a .php file it doesn't work it simply just shows the code WITHIN the php file, the php itself does not work.
I have downloaded and uninstalled XAMPP 3 times today.
Any ideas?
This is a rookie mistake, Make sure the URL says localhost/index.php and not file:///C:/...
To fix the problem you need to change xampp port from 80. Normaly 81 works just fine.
Follow these steps to change the XAMPP server port number:
1) Stop the XAMPP server, if it is running already.
2) Open the file [XAMPP Installation Folder]/apache/conf/httpd.conf.
3) Search for: "Listen 80"
4) Change to (Example): "Listen 81"
5) Search : ServerName (Update this too)
6) Save
7) Restart XAMPP server and you are done.
Note:
Now your url is: www.localhost:81
You should just try reinstalling the operating system as well as xampp over again. My answer takes into consideration that you have already tried installing xampp three times. If you have a Mac just restart holding the command and r keys and then wait for the recovery center to come up. Then select reinstall osx. This requires internet. If you have windows there might be an install disk that came with the system and try reinstalling from the disk.
Problem is that port 80 is being used by some other application. If you have installed skype it would skype. We can manually change the port used by skype for that check the answer for this SO question How to solve WAMP and Skype conflict on Windows 7?
You can also make sure which appication is using port 80 by checking this SO question How to find which program is using port 80 in Windows?
I Installed WAMP Server Successfully.
My OS is: Windows 7 32-bits
My Wamp Server is: 2.2E ( 32bits & php 5.3 )
I had same problem 4 months back. That time, I used this link. (but OS & WAMP are 64-bits) It's worked fine.
Now, that MSVCR100.dll not gave any problem. But WAMP logo is always 'yellow' color only. That's not return to 'green'. I installed vcredist_x86.exe
I uninstalled 'Avast', for my friend refer. But no Use. Help Me...
Thank you...
You can check if the port is being used by other program using WAMP menu -
Click on WAMP icon select Apache -> Service -> Test Port 80, this will check if the port is used by any other program
Also do this select Apache -> Service -> Install Service, this will make apache use port 80 if the port is not already used by any other program like IIS or Skype
Restart the WAMP see if the problem is fixed.
If port 80 is already used by some program, then you can choose other listening port for WAMP. To do this -
click WAMP icon -> Apache -> httpd.conf
Now find listen 80 (where 80 is port number, it can be different on your system)
Now change that to something else like 3333, you can access WAMP homepage by typing localhost:3333 or 127.0.0.1:3333 in browser's address bar.
If you want WAMP to use port 80, uninstall the program that is using port 80 and then do things stated in step 2 or you can change port in that program's setting, also check httpd.conf file for listen [port] line.
I found something I did wrong, install the Apache and MySQL services. Click on the WAMP logo, goto Apache -> Service -> Install Service, after that Apache -> Service -> Start/Resume Service. Do the same for MySQL and it will turn green.
I would prefer using the most easiest method.
Right click on the Wamp icon and go to
Tools > Use a port other than 8080 >
Set a different port, lets say 8081 and that's it. Problem resolved.
You are most welcome.
Click wamp icon :
1- apache -> httpd.conf (A notepad file will be opened)
2- Find 80
3 -Replace with 81
Listen 12.34.56.78:81 Listen 0.0.0.0:81 Listen [::0]:81
4- Restart wamp services
!!Done
I have same issue with IIS, i uninstalled IIS.
Type in run services.msc, I see "wampapache64" service was not running, when I start it using right click it give me error.
I just used these steps.
Click on WAMP icon select Apache -> Service -> Remove Service
Click on Wamp icon select Apache -> Service -> Install Service
Got green Wamp icon :(
CMD > netstat -ao > look for any line like 0.0.0.0:80 and look at the PID value (e.g. 4796)
Open Task Manager > Processes tab > View > Select Column > Tick on PID (Process Identifier) > OK to create new column
Look at the processes list in Task Manager > Sort by PID (the new column) and find the 4796 to know which program is using Port 80. Mine is Bit-Torrent. After close (exit) Bit-Torrent, Wampserver should work as usual.
You should also make sure that the ports WAMP uses aren't already in use.
That can be done by typing the following command into the command prompt:
netstat –o
Open cmd and type the command below.
netstat -o -n -a | findstr 0.0:80
Last column of each row is the process identifier (PID)
You can find the application that reserves port 80, using taskmanager services tab or just type tasklist in cmd.
Then follow this link:
http://www.ttkalec.com/blog/resolving-yellow-wamp-server-status-freeing-up-port-80-for-apache/
Quit skype and right click on wamp icon-apache-services-start all services that will work after wamp server is start you can use skype again ;)
The above answers are very reasonable but my solution was simply to run the installer as administrator.
This is clearly stated here on the wampserver forum (2nd tip).
There are 20 other suggestions as well.
I've had the above solutions work for me on many occasions, except one; that was after I buggered up an alias file - ie a file that allows the website folder to be located in another location other than the www folder. Here's the solution:
Go to c:/wamp/alias
Cut all of the alias files and paste in a temp folder somewhere
Restart all WAMP services
If the WAMP icon goes green, then add each alias file back to the alias folder one by one, restart WAMP, and when WAMP doesn't start, you know that alias file has some bad data in it. So, fix that file or delete it. Your choice.
In the tray, right click on the wamp icon select tools, in the mysql section, select use a port other than 3306 you should see a pop up, enter the port number, 3308 will be suggested, the server should restart after you click Okay, if not restart it yourself.
That worked for me.
Regards
This is driving me crazy! I have MySQL preference pane on my Mac OS X Lion, and also start and stop it from Terminal. mysql works from terminal and I can connect to databases, but when I do it from PHP source code it doesn't connect. It worked last night but now it doesn't and I dont know why. Here is a few details:
I'm telling php.ini to look for mysql.sock in the correct directory
I have also set the socket variable in my.cnf of mysql to the correct path.
Just to be sure, I have created a symlink in the default directory for mysql socket (/tmp/mysql.sock) to link to the socket file in /var/tmp/mysql.sock.
When I have stopped MySQL from the preference pane, and I try to start it from Terminal, it says 'SUCCESS!' but I can't use it with the command mysql in Terminal.
Can anyone get anything out from this messed up situation??
Answering my own question:
OK so I don't know why but I had discrepancies in the configuration. Even though I had set the socket variable in my.cnf file, when I started mysql server, it always looked for a different location for the socket.
my.cnf
[mysqld]
socket=/var/tmp/mysql.sock
[client]
socket=/var/tmp/mysql.sock
and I was still getting the error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). Note how it still looks for /tmp/mysql.sock?
After finding this link, I realised that my mysql server was never reading my config file in /usr/local/mysql/my.cnf.
This is what I got from mysqladmin command:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
Solution: I created a symlink in my home folder
ln -s /usr/local/mysql/my.cnf ~/.my.cnf
And yess! Problem solved :)
i just installed xampp on my pc windows 7 64bit,it seems everything was successfully installed but when i click on phpMyAdmin i get an error like this on the image below
Check to see if MySQL is started and not just Apache/PHP.
Try disabling your firewall. If that works, look into properly creating a firewall rule for it.
In the future, these questions would be better posed in other venues (consider serverfault.com or webmasters.stackexchange.com)
Open the command line and type in:
mysql -u root -p
Enter the password (if no password set, leave off -p switch).
If you can get in, at least you know MySQL is running properly. So the fault is not there.
Check phpmyadmin's config.inc.php file. It could have wrong login mechanism set, the wrong username/password set, or is using a port number other than 3306 (default for MySQL).
Also consider trying some of the other wamp packages such as : WampServer, UniformServer, ZWamp, WampDeveloper (commercial)...
http://en.wikipedia.org/wiki/Comparison_of_WAMPs
You might have better luck there. Just make sure to uninstall, delete, and reboot first.