I\'m on a Mac OSX Mountain Lion. Xampp won\'t let me start MySQL server.
I have set the permissions to Read/Write for everyone and every file in the XAMPP folder.
<looks into the error log and you may find:
[ERROR] Bad magic header in tc log
[ERROR] Can't init tc log
delete /Applications/XAMPP/xamppfiles/var/mysql/tc.log and restart the mysql
First read the error file located at /Applications/XAMPP/xamppfiles/logs/error_log, normally this error occurs if something is running on port 3306 already.
chmod -R 777 /Applications/XAMPP/xamppfiles/var
fixed the problem for me. Refer - StackOverflow question
However do not do this in production servers, you may need to change the owner or group (chown
or chgrp
to resolve the problem.
You should try to configure your MySql Database and change you port from 3306 to 3307 , this work for me . Sometimes this port is busy and does not work for your pc.
you can check if any instance of mysql is running by executing in the terminal
sudo ps aux | grep mysql
this will list any processes that have mysql in their name.
_mysql 18943 0,0 0,5 2514608 20340 s008 S+ 5:46am 0:00.07 /opt/local/libexec/mysqld --basedir=/opt/local --datadir=/opt/local/var/db/mysql5 -- user=_mysql --log-error=/opt/local/var/db/mysql5/Max-NB.local.err --pid- file=/opt/local/var/db/mysql5/Max-NB.local.pid
root 18900 0,0 0,1 2439964 2592 s008 S+ 5:46am 0:00.15 /bin/sh /opt/local/bin/mysqld_safe5
root 18899 0,0 0,1 2439396 2616 s008 S+ 5:46am 0:00.02 sudo mysqld_safe5
you may then terminate the process by executing
sudo killall mysqld_safe5
you should replace "mysqld_safe5" by the name of your mysql process. It is most likely "mysqld".
After that you could try to restart your server and check if it works.
I had the same problem, but managed to solve it by replacing my.cnf with the original file. It had the following line coming removing which solved the problem.
listen 80