title: 500 internal server error on virtual hosting magento
body: <p>I am running magento sites on virtual host.All are working properly except one where  on product saving it shows me 500 error.I search and did alot of techniques but couldn't succeed.Can anyone tell me that either this is my side issue or server side.I check magento logs but no error or exception.Only on product save it show me the error.Thanks I also enable rewrites from htaccess.
  While watching <code>var/reports</code> i found two types of errors in all files:</p>
  
  <ul>
  <li><code>SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction</code></li>
  <li>S<code>QLSTATE[42000] [1044] Access denied for user 'magento'@'%' to database</code> </li>
  </ul>