Xampp Won't Startup MySQL server on Mac OSX?

前端 未结 6 1756
星月不相逢
星月不相逢 2021-02-06 02:36

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.

<
相关标签:
6条回答
  • 2021-02-06 02:39

    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

    0 讨论(0)
  • 2021-02-06 02:43

    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.

    0 讨论(0)
  • 2021-02-06 02:46
    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.

    0 讨论(0)
  • 2021-02-06 02:48

    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.

    0 讨论(0)
  • 2021-02-06 02:54

    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.

    0 讨论(0)
  • 2021-02-06 02:57

    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
    
    0 讨论(0)
提交回复
热议问题