Moving Site To New Server, Don't have database passwords

Discussion in 'MySQL' started by phjohnso, Oct 11, 2007.

  1. #1
    im in the process of moving many sites over to a new host. During the process I find out that there are several sites I had bought in the past where I don't have the password for the sql database.

    So I'm stuck moving those sites because i don't know how to find out what the passwords are that was used for some of the user accounts. This might be an obviously dumb question but I don't know how to do this.

    what am i missing?
     
    phjohnso, Oct 11, 2007 IP
  2. alemcherry

    alemcherry Guest

    Best Answers:
    0
    #2
    The passwords and username will obviously be written in the script. if you know little bit of PHP, it must be easier. You can look for files like db.php , common.php, include.php, settings.php etc. in common places like root directory or includes directory. Scan all the files till you come across something. Anyways, you may have to edit it after moving to a new server and setting up the database there.

    Alternatively, if you have a control panel like Plesk or cpanel, you can login to mysql directly from control panel. You can do backup etc. but still you may have to edit the php files since the values could be differnt in new server.
     
    alemcherry, Oct 11, 2007 IP
  3. phjohnso

    phjohnso Well-Known Member

    Messages:
    862
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #3
    i have cpanel, so if i back up the db's will the user id's and passwords be included with the restore???
     
    phjohnso, Oct 11, 2007 IP
  4. BribeMe

    BribeMe Peon

    Messages:
    288
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    just go into the scripts, the passwords and usernames will be listed there.. Prehaps in the config file?
     
    BribeMe, Oct 11, 2007 IP
  5. phjohnso

    phjohnso Well-Known Member

    Messages:
    862
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #5
    YES - thanks for the obvious that I couldn't see, I will now be able to move on to move the remaining sites.
     
    phjohnso, Oct 11, 2007 IP