MySQL is installed inside xampp directory. In Mac OS it is installed on /applications/xampp/. All we need to do is add the mysql service to our PATH global variable.
- Run: nano ~/.bash_profile
- Add (or edit the line if it exists): export PATH=$PATH:/applications/xampp/xamppfiles/bin
- Save the file
- Run: mysql -u root (also -p myPass if it has a password defined).
To start, restart or stop the service you can run "sudo mysql.server [start/restart/stop]".