Ubuntu or Linux Error: Unable to access XAMPP MySQL from /opt/lampp/bin/mysql

Here’s the complete article on the solution with baby steps:
How to link php from XAMPP installation to use php command from user or any other directory in Ubuntu or Linux

Chetan