You just found a bug in XAMPP for Solaris.
But a found bug is a good bug!
The command line mysql client do not load the my.cnf configuration file and don't know where to find the mysql.sock file. I'm now trying to fix this problem. But it's a bigger problem and I need some time to fix this.
A simple workaround is to set the socket file in the command line:
But I'll try to fix this problem as soon as possible.