How to add a MySQL password for XAMPP on OSX

By default an installation of XAMPP has no password which is not secure at all.

To secure it, launch the terminal from /Application/Utilities/ and type the following command to start an interactive tool like below screenshot:

 

#sudo /Applications/XAMPP/xamppfiles/xampp security

Now, follow the onscreen instruction to change the password for MyXQL, PHPMyAdmin and FTP.