If you are getting error "Can't connect to local MySQL server through socket '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' (61 "Connection refused")" when starting XAMPP on MACOS - here is the solution.
Go to terminal and go to your XAMPP installation directory
then login as a admin, type this in terminal
and after that type in your password
when you are logged in as admin, start xampp by using command line:
you will see this output:
Starting XAMPP for Mac OS X 7.0.9-0... XAMPP: Starting Apache...ok. XAMPP: Starting MySQL...ok.
And that is it, you can now go to http://localhost/phpmyadmin/ and you will see your database.