getting database connection error if connect the site without www
I'm running Wordpress latest package on Ubuntu 14.04 with apache and mysql server. Everyting was running perfectly, but this evening I'm getting database connection error without using www.
I'm also using monit for keep running whole system. So the monit status is returning everyting is perfect.
So what ist the problem? How can I solve this?