From: Warren Young Date: October 1 2010 5:37pm Subject: Re: Problem: Access denied for user 'root'@'localhost' (using password: NO) List-Archive: Message-Id: MIME-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable On Oct 1, 2010, at 7:20 AM, Hossein Younesi wrote: > I assumed that destructor will close the connection automatically! Why assume? You have the source code. (And yes, it does.) Are you sure all Connection objects are being destroyed correctly? Also, the other respondent brought up another possibility, that more = connections are open at a given time than the MySQL server allows. That = doesn't necessarily indicate that connections are never being closed, = just that too many are being established. It may be that the proper fix = is to keep connections open longer, and reuse them. Are you using ConnectionPool? If not, why not?=