Changed database password - can't log in

Discussion in 'Installation' started by realfood, Jan 10, 2011.

  1. realfood

    realfood aMember Pro Customer

    Joined:
    Nov 19, 2009
    Messages:
    9
    I had to change my database password after my site got hacked.

    I can't change the database password back to what it was - my host won't let me use an old password.

    I am getting this error:

    "Script Error
    Cannot connect to MySQL: Access denied for user"

    How do I change this information in aMember? I don't want to reinstall it. I just want to change the database password to match the new one.

    THanks,
    Ann Marie
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    On your server, edit the amember\config.inc.php
  3. realfood

    realfood aMember Pro Customer

    Joined:
    Nov 19, 2009
    Messages:
    9
    Hi, can you please tell me what part of the code in config.inc.php I'm supposed to edit?

    I've searched through the file several times and I don't see any database password information.

    Thanks!
  4. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    PHP:
      $pc = array();
        
    $pc['db']   = 'xxxx_xxxxxx';         // database name
        
    $pc['user'] = 'xxxx_xxxxxx';         // db-Username
        
    $pc['pass'] = 'xxxxxxxxx';           // db-Password
        
    $pc['host'] = 'localhost';
        
    $pc['prefix'] = 'amember_';
        
    $pc['charset'] = ''// replace with 'utf8' for example
    Note above around line 30. I have added the comments
  5. realfood

    realfood aMember Pro Customer

    Joined:
    Nov 19, 2009
    Messages:
    9
    Thank you.

    I was looking at the wrong file. No idea how I did that since it was named the same thing.

    I found it now.
  6. realfood

    realfood aMember Pro Customer

    Joined:
    Nov 19, 2009
    Messages:
    9
    OK I changed the info in config.inc.php and now I am getting this error:


    Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c05/h04/mnt/78890/domains/cheeseslave.com/html/menus/tabs.inc.php on line 155
  7. realfood

    realfood aMember Pro Customer

    Joined:
    Nov 19, 2009
    Messages:
    9
    OK I did a little googling and found out that it was a PHP error - I went in to my host and reset the server from PHP4 to PHP5.

    Works now.

    Thanks!

Share This Page