Check out example codes for "mysql server not starting in xampp in mac". It will help you in understanding the concepts better.

Code Example 1

sudo rm -rf ~/.bitnami  // type this command in your terminal.
//THIS WILL SOLVE THIS PROBLEM BUT WILL DELETE ALL YOUR DATABASES

Learn ReactJs, React Native from akashmittal.com