My URLs was shows wrong:
http://mydomain.com/domains/mydomain....php/f-20.html and that i should fix it first.
I ended up enabling vbseo plugin, going to admincp, vbseo, Settings, Options, Advanced settings and set DocRoot path there to be /home/myusername/domains/mydomain.com/public_html
Now URLs show up right and a few days i seen no MySQL error :erm: i think these URL things can also relate to .htaccess. I will report back if the issue re-appear..