For the command line way, i considered the following steps;
Presuming you have installed lampp in /opt directory, start the XAMPP server
sudo /opt/lampp/lampp start
Then login from console into mySQL using
/opt/lampp/bin/mysql -u root -p;
You will be prompted for the password then. Don't panic just because you don't know it. By default, no password is set for the user "root" in mysql. So press the return key.
Now you are finally on the track. Play around with sql queries!!! Have fun :)