Do i really have to know my SQL database passowrd?

Discussion in 'MySQL' started by killar, Aug 3, 2009.

  1. #1
    Hello,
    I have a few sites of which i do not know the password....does it really matter?
    I usually just generate a password and just forget about it.

    is there a way to recover my sql password?

    thanks in advance.
     
    killar, Aug 3, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ofcourse it matters.. If you have cpanel, go to databases or mysql and you can change it there per site.
     
    premiumscripts, Aug 4, 2009 IP
  3. mioot

    mioot Peon

    Messages:
    169
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You have used those passwords in webpages , you get it from there . Most of the control panel woun't show the passwords and you have to update.
     
    mioot, Aug 4, 2009 IP
  4. williamsweb

    williamsweb Active Member

    Messages:
    2,016
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    75
    #4
    i have the same question
    how to recover lost mysql password?
     
    williamsweb, Aug 4, 2009 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    No way to recover a lost password. You can change the password provided you have access to the root user or a user with GRANT access.
     
    jestep, Aug 4, 2009 IP
  6. killar

    killar Active Member

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #6

    and how do i do that?
     
    killar, Aug 4, 2009 IP
  7. Rudolf Bodocsi

    Rudolf Bodocsi Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7

    Hi,

    Best way if you contact your hosting company support team. They will be reset your password or explain how to reset password.

    Rudolf
     
    Rudolf Bodocsi, Aug 5, 2009 IP
  8. killar

    killar Active Member

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #8
    when reset by host, do i lose all information?
     
    killar, Aug 6, 2009 IP
  9. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #9
    No, they will just give you a new password. If you have any scripts/sites using that db, you will then have to update the pw in the config file. (Though if you do, you can just see the current pw in the config files of those scripts..)

    I believe you can also just reset the password in cpanel > mysql.
     
    premiumscripts, Aug 7, 2009 IP
  10. Rudolf Bodocsi

    Rudolf Bodocsi Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hi,

    You don't loose anything. You or provider just reset your password's. After changing password you need update configuration files with new password. If you don't now in which file you need change your database password let me now. I will be found out for you. Just write me down which application use in your web site.

    Rudolf
     
    Rudolf Bodocsi, Aug 7, 2009 IP
  11. killar

    killar Active Member

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #11
    provider = my host right? can they really do it? if reset, how do i change the pass?

    i'm running different scripts, but after installing it, i deleted the config.php file already, so how do i change the password from that script as well?
     
    killar, Aug 16, 2009 IP
  12. Rudolf Bodocsi

    Rudolf Bodocsi Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Hi,

    Yes, Provider = your hosting company. They can do anything with your web hosting. They have complete administrator right to your account.

    To change your database password in your script you need to find the configuration file. Mostly you can find in include directory but different script storing in different place.

    Example:
    - WordPress store database password in wp-config.php file. In wp-config.php you can find “define('DB_PASSWORD', 'old password'); line and you need change 'old password' to 'new password'.

    Rudolf

    p.s. One idea if you find and check your configuration file actually you can recovery your password. Mostly in configuration file store password in plain text for database.
     
    Rudolf Bodocsi, Aug 16, 2009 IP
  13. killar

    killar Active Member

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #13
    thanks Rudolf, i found my config file with my password.

    Now...going off topic, how would i go about backing up database and restoring it later on? like sometimes files go corrupted or server get hacked or something..u know

    thanks everyone for helping out
     
    killar, Aug 16, 2009 IP
  14. Rudolf Bodocsi

    Rudolf Bodocsi Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Hi,

    You have lot of option to backup database.

    If you have command prompt access to your server than is a best way to write one script which backup your database and your web site to temporary directory. After that compress temporary directory and send with ftp program to your home machine or your backup server. Don't forget schedule your script to backup your server minimum one time per day.
    if you don't have command prompt access then you can use maybe your web site Control Panel (cPanel) or PhpMyAdmin.

    Rudolf
     
    Rudolf Bodocsi, Aug 17, 2009 IP