Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Database cannot start on XAMPP for Mac

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

like image 777
Raaj Lokanathan Avatar asked Jan 08 '15 07:01

Raaj Lokanathan


4 Answers

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:

MySQL 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 ✌🏼

like image 97
CruzBaggio Avatar answered Oct 17 '22 04:10

CruzBaggio


#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! "
like image 21
Shailesh Dwivedi Avatar answered Oct 17 '22 06:10

Shailesh Dwivedi


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

like image 43
Aamir Mahmood Avatar answered Oct 17 '22 05:10

Aamir Mahmood


Xampp Control Panel> Manage Server> Mysql Database > Configure > change the port from 3306 to 3307

At least it worked for me in mac.

like image 21
Kunal Kumar Avatar answered Oct 17 '22 04:10

Kunal Kumar