title: How do I fix this error: [1045] SQLSTATE[28000] [1045]
body: <p>I am working on a server that is not my localhost for the first time. I am renting hosting space from hostgator.  I created a form that is supposed to take the user's information and put it in the database.  I keep on recieving the following error message when I try to submit the form:</p>
  
  <blockquote>
    <p>Failed to open database [1045] SQLSTATE[28000] [1045] Access denied
    for user 'username@localhost'@'gator7899.hostgator.com' (using
    password: YES)</p>
  </blockquote>
  
  <p>I have seen other posts in which people ask the same question but none of the answers given are working for me.  Also, username is not my actual username and gator7899 is not the actual server.  For security purposes I did not post them here.</p>
  
  <p>Does anyone know how to fix this?</p>