New to linux. I want to connect to mysql server from ubuntu terminal and execute commands, please help.

Got a spare linux desktop box and thinking of using it as my own local dns server. how to install dns in ubuntu desktop 9.04? thanks in advance
I am getting the following error in ubuntu while launching synergy2 as a server to share my mouse and keyboard with my windows vista machine
INFO: synergys.cpp,1042: Synergy server 1.3.1 on Linux 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009 i686
DEBUG: synergys.cpp,1051: opening configuration "synergy.conf"
DEBUG: synergys.cpp,1058: cannot open configuration "synergy.conf"
synergys: no configuration available