Changing phpmyadmin username and password

Discussion in 'Hosting Discussions' started by sho, Nov 22, 2005.

  1. sho

    sho Participant

    52
    6
    +0
    Hi,
    Total tech newbie here... I don't know if I have posted this in the right place, or if the terms I use are correct...

    I have taken over a message board as admin and owner after the former owner decided he wanted out. I have changed all usernames and passwords for hosting services, site management, admin access, domain ownership etc, but I can't find a way to change the username and password for phpmyadmin. I of course really want to and need to do that to make sure the old owner doesn't have access to the database.

    I have heard that changing this username and password might... change other things and affect the database or the site or something... Could you tell me what would happen if and when I change the username and password? I am terrified of screwing something up!

    How can I change the password and username... and what will happen when I do so... Please help :confused:
    sho
     
    1
  2. Oldiesmann

    Oldiesmann SMF Lead Developer

    4,180
    620
    +38
    You need to change the values for the $cfg['Servers'][$i]['user'] and $cfg['Servers'][$i]['passwd'] in phpMyAdmin's config file. Before you do that though, look at the value for $cfg['Servers'][$i]['auth_type']. If it's "config", then go ahead and change the username and password to whatever you want. If it's "cookie" or "http", then you need to create a new MySQL user account before you change those values.
     
  3. sho

    sho Participant

    52
    6
    +0
    thank you for replying, but unfortunately i have no idea how to use your info :hopeless: *cries*

    when i say total tech newbie, i mean total tech newbie :(

    *cough* where is the phpMyAdmin config file...?
    sho
     
  4. sho

    sho Participant

    52
    6
    +0
    i'm trying to dig around as much as i can, but i'm not getting any wiser :hopeless:

    when i log into phpMyAdmin with the former owner's password and username i get: "Welcome to phpMyAdmin 2.2.6.
    MySQL 3.23.54 running on localhost as [former owner]@localhost
    when i go to [my domain].com/config.inc.php3 i get the message that "The requested URL was not found on this server".

    i know it must be hard to even begin to explain things to me without wanting to :banghead: , but i'd really appreciate it.
    sho
     
  5. xxcite81

    xxcite81 Neophyte

    2
    1
    +0
    What you need to do is to look in the phpmyadmin folder to see if there is a config.default.php. if there is coopy it andd rename to config.inc.php, then u can edit as explained above.

    If you cant a popup to ask for the password change the auth_type to http or change to cookie if u want a web login.
     
  6. teknohan

    teknohan Neophyte

    3
    1
    +0
    I really need some help about phpmyadmin I changed name and password but problem it was cookie and it doesn`t wor
    I changed like this

    /*
    * Generated configuration file
    * Generated by: phpMyAdmin 3.2.2.1 setup script by Piotr Przybylski <piotrprz@gmail.com>
    * Date: Wed, 21 Apr 2010 23:53:13 +0300
    */

    /* Servers configuration */
    $i = 0;

    /* Server: localhost [1] */
    $i++;
    $cfg['Servers'][$i]['verbose'] = '';
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = '';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'teknohan';
    $cfg['Servers'][$i]['password'] = '******';

    /* End of servers configuration */

    $cfg['blowfish_secret'] = '4bcf6571f30ef0.33299549';
    $cfg['DefaultLang'] = 'en-utf-8';
    $cfg['ServerDefault'] = 1;
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';

    it was like that
    <?php
    /*
    * Generated configuration file
    * Generated by: phpMyAdmin 2.8.1 setup script by Michal Čihař <michal@cihar.com>
    * Version: $Id: setup.php,v 1.23.2.8.2.2 2006/05/15 07:57:09 nijel Exp $
    * Date: Sat, 27 May 2006 17:10:09 GMT
    */

    /* Servers configuration */
    $i = 0;

    /* Server localhost (cookie) [1] */
    $i++;
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['auth_type'] = 'cookie';

    /* End of servers configuration */

    $cfg['blowfish_secret'] = '44aswedwed232';
    ?>
     
  7. HostColor

    HostColor Participant

    63
    6
    +0
    If you are under shared hosting account, you can easily change your MySQL password through your control panel(the MySQL username's password is your phpMyAdmin password aswell).

    Assuming you are on a VPS or a server without a control pane, then you can change your MySQL username through the phpMyAadmin, there is no need to change any configuration files. Just log in to your phpMyAadmin(reading your initial post I assume you have access) -> Select your forum database by clicking on its name on the left tab -> Privileges -> Locate the user from the table and lick on the icon under "action" tab(check the screen bellow for clearer orientation) -> On the new page that opens, scroll down a bit and you should see the fields under "Change Password" -> Enter your new password twice and click on the "Go" button.
    [​IMG]

    Have in mind that by changing the MySQL username or password, you will need to edit your forum's configuration file which specifies the database info with the new credentials.

    Please let us know if this helped you out.
     
  8. WebhostGIANT_Rob

    WebhostGIANT_Rob Adherent

    365
    0
    +0
    I'm absolutely agree with this statement. Moreover I'm sure you need to contact youe provider and ask them to help you. I'm seeing that is very vital for you so do not hesitate to contact them.
     
  9. teknohan

    teknohan Neophyte

    3
    1
    +0
    if I don`t know that you would help me but I said I can`t enter to phpmyadmin but problem sold solition was about linux system they made a different way to have a password I use it and I use a inux system named pardus if you wonder I can help but not really good for php server or something like that
     
  10. WebhostGIANT_Rob

    WebhostGIANT_Rob Adherent

    365
    0
    +0
    If you do not know how exactly to do that why you offer your help in here?
     
  11. teknohan

    teknohan Neophyte

    3
    1
    +0
    maybe I can't help you but there is an IRC system and they are really helping to users and they found the solution for me and it wasn't first.
     
  12. anu

    anu Neophyte

    2
    1
    +0
    how to find username and password

    I follow ur instruction but in my config.default.php there is no password.... then can I dirctly write in that file or what is another way to set password???????
     
  13. anu

    anu Neophyte

    2
    1
    +0




    Hurreeeeeeeeeeeeeeeeee:banana:
    Its working thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
  14. yanique

    yanique Neophyte

    1
    1
    +0
    Similar problem or reoccuring password changes, not fixable via phpMyAdmin

    it seems to me like my situation cannot be fixed via phpMyAdmin.

    I am not a techie - so maybe there is something I am missing.

    The problem is I am sure that someone has hacked my site and changed the password. My site is still up, I just dont have access anymore, i cant login via wordpress.

    So i;ve logged into my phpMyAdmin to try and change the password, but even when I do all the steps including making sure to check MD5, the saved password still goes back to a long string of characters that i never created.


    can someone help me with this please!

    or anyone with a similar problem?:help:
     
  15. BHH

    BHH Enthusiast

    196
    78
    +3
    Create a new thread instead of posting here.
     
  16. f3rv

    f3rv Neophyte

    1
    1
    +0
    Hi, I need help, this is driving me crazy.

    I have a backup of a Joomla website that I want to work on in MAMP PRO. When I launched phpmyadmin from MAMP’s start page and I was creating the new database (I was automatically logged as root in localhost btw) I mistakenly unchecked all the privileges of the root user, and clicked go. Now I don’t have any privileges at all, I cant see my other databases or see the other user I created, I don’t even know how to change the user or log out so I can log in with another one, I don’t know how to restore the privileges, I’m trapped just by a stupid mistake.

    Please help.
     
Verification:
Draft saved Draft deleted