I had searched for some time for the same thing.. But here it is..
This is only in the case of a linux system..
Say your XAMPP files are at /opt/lampp
On command line, type (assuming you want to log in as root)
/opt/lampp/bin/mysql -u root -p
This will be followed by typing the mysql password, thats it.. You are on command mode of mysql !!
Thanks for the tip in your posting. I couldn’t find the proper syntax to start the command line for XAMPP on other sites. On my Windows computer, “mysql -u root -p” (less the “”) worked in the C:xamppmysqlbin directory.