Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Database won't start in XAMPP Manager-osx

People also ask

Why MySQL database in XAMPP is not starting?

Fixing the MySQL server not starting in XAMPP is done by reverting back the data files pre-issue. Navigate to your XAMPP MySQL directory ( C:\xampp\mysql ). Create a new folder called FIX_BACKUP . Copy C:\xampp\mysql\backup and C:\xampp\mysql\data into C:\xampp\mysql\FIX_BACKUP .

Why is MySQL not opening on Mac?

The reason behind the MySQL Workbench client not working can be many. It can be because your macOS version is not compatible with the version of the Workbench that you downloaded, or maybe because the version of Python installed on your macOS is not compatible with the version of Workbench you have downloaded.


This should work:
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start


Minimal Guide

1. sudo killall mysqld

2. manager-osx > start mysql


If that didn't work...

sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

Google the error...


Examples:

Error:

ERROR! The server quit without updating PID file (/Applications/XAMPP/xamppfiles/var/mysql/<computername>.local.pid)

My Solution:

In /Applications/XAMPP/xamppfiles/etc/my.cnf change user = <uid> s that <uid> is uid from id command.

$ id
uid=...

$ vim /Applications/XAMPP/xamppfiles/etc/my.cnf
...

If these commands don't work for you:

sudo killall mysqld
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

Try this:

For XAMPP 7.1.1-0, I changed the port number from 3306 to 3307.

  1. Click on Manage Servers
  2. Select MySQL Database
  3. Click on Configure on your right
  4. Change your port number to 3307
  5. Click OK
  6. Close your Control Panel and relaunch it.

You are now good to go.


check the err log on your /Applications/XAMPP/xamppfiles/var/mysql/ with filename like your_machine_name.local.err, if you find something like: "Attempted to open a previously opened tablespace. Previous tablespace ... uses space ID"

the following works for me:

edit file:

/Applications/XAMPP/xamppfiles/etc/my.cnf

find the [mysqld] section, add one line:

innodb_force_recovery = 1

then run

sudo /Applications/XAMPP/bin/mysql.server start

everything is ok again.

and then the last step:

edit the my.cnf again and remove the line you just added :

innodb_force_recovery = 1

and restart mysql again. Otherwise all your tables will be read only


Try running these two commands in the terminal:

  1. sudo killall mysqld
  2. sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start