Results 1 to 30 of 30
  1. #1

    Lost mysql password, how to change in WHM/cpanel?

    I have lost my password for a mysql database.
    I am planning to move site/s to another server.
    How to change in WHM/cpanel?

  2. #2
    Crucial Web Host is offline [email protected]
    Join Date
    Apr 2006
    Location
    Phoenix, AZ, USA
    Posts
    744
    Hi Kenigmatic,

    Simply log into WHM and scroll down and find SQL Services. In that section you will find a link to reset your root password for MySQL.

    Kindly,

    If you dont have access to cpanel and you're just trying to reset a passwod for a a local dbuser. Log into cpanel and go to databases. From there you can just change the password for the db user.
    Last edited by bear; 02-03-2007 at 02:26 PM.
    CrucialHosting.com - Performance Hosting Solutions:
    SamsClub.com - Walmart.com - Ellusionist.com - CampSaver.com

    Check out our Site Showcase for more big brand examples!

  3. #3
    Join Date
    Oct 2002
    Location
    Middle Dearth
    Posts
    22,645
    Sounded like he lost one password, not the root pass? You should be able to edit by just entering the same username in mysql (from the cpanel link) and creating a new password. It should overwrite the existing one. Remember to change any connection scripts to use the new one as well, or they will fail.
    Having problems, or maybe questions about WHT? Head over to the help desk!

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    59
    If your looking for a quick resolution it's best just to recreate the mysql user in cPanel - I believe mysql passwords have to be reset by root.

    Hope this helps
    Chris Priestland
    Host Centric
    www.host-centric.co.uk
    Host Centric is part of the JMF Group which has been provisioning web hosting since 2003

  5. #5
    Join Date
    Jul 2010
    Location
    Peoria, AZ USA
    Posts
    6
    Quote Originally Posted by urevisedhosting View Post
    If your looking for a quick resolution it's best just to recreate the mysql user in cPanel - I believe mysql passwords have to be reset by root.

    Hope this helps

    Yeah, im pretty sure the reset would have to be done via the root user.

    But if you delete / recreate the user, it should work. Or you can create a totally new user for the database. It wont lose any of the data, it will just be like adding a new user to an existing database.

  6. #6
    You will need the root access to change the password through WHM >> SQL Services >> Change Mysql user password or you can get change it through the cPanel >> MySQL Databases.
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

  7. #7
    I've had a lot of trouble with this in the past, it's good to see some support on this.

  8. #8
    Join Date
    Aug 2009
    Location
    Riverside, CA
    Posts
    33
    I probably wouldn't be messing with the mysql login details through WHM itself, it's best to create a new user in the cpanel area of the account in question, which you access either from whm in the list accounts page, or by logging into the cpanel account directly. Create the user and add it to your database, it's possible to have more than one user on a database as well if you don't want to mess with the one you setup already.
    Webcave Hosting - Today's Gateway to Perfect Hosting!
    *Non-Oversold Shared hosting *Dedicated Servers *Web Design *Domain Names
    24/7/365 LIVE Technical Support/Sales via phone, live chat, email and ticketing system.
    30-Day Money back guarantee, 99.99% uptime SLA. - WebCaveHosting.com

  9. #9
    help...why can't I access my cpanel at all? My welcome page says login to cpanel gives me a password, but, to date I can't get in....

  10. #10
    login to phpmyadmin or to your root mysql account via SSH and create a new user with access to your database. If you cant access cpanel you need to change your root pass on your account or vps

  11. #11
    Join Date
    Jul 2009
    Location
    CT
    Posts
    915
    Quote Originally Posted by bear View Post
    Remember to change any connection scripts to use the new one as well, or they will fail.
    Just look in the script! You say you have access to cPanel. Look in the database connection script.
    ☆☆☆ Miss Names - Cool domain names for sale! - MissNames.com☆☆☆

    ☆☆☆ Find a new pet for your home ... Find a new home for your pet - WeGotPets.com☆☆☆

  12. #12
    Join Date
    Sep 2010
    Location
    Ohio
    Posts
    9
    Quote Originally Posted by tiaratext View Post
    help...why can't I access my cpanel at all? My welcome page says login to cpanel gives me a password, but, to date I can't get in....
    You will want to contact your hosting provider to get that password reset, unless you have access to WHM as root. If this is the case then you would be able to change the password by logging in as root >> Account Functions >> Password Modification

    Most welcome letters that I have come across for VPS only contain the root password and not the cPanel account information so you could be trying to login to cPanel as root which will not work.

    As for the MySQL database issue, I would have to agree with everyone else that creating a new user and adding it to the database is the best route to go. Then just delete the old user and update your configuration files to use the new user/pass combo.

    Mike M.

  13. #13
    Join Date
    Sep 2010
    Location
    Maidstone, Kent, UK
    Posts
    20
    +1 for Crucials suggestion

  14. #14
    Join Date
    Mar 2008
    Location
    India
    Posts
    115
    Quote Originally Posted by inspiron View Post
    You will need the root access to change the password through WHM >> SQL Services >> Change Mysql user password or you can get change it through the cPanel >> MySQL Databases.
    yes this is right way, You can change it whm or cpanel, both have access if you want to change multiple website a/c than use whm..........
    professionally managed Web hosting India, Host Company offer Reliable Web Hosting India at economic rate.

  15. #15
    Join Date
    Apr 2007
    Location
    India
    Posts
    68
    If you have WHM panel password then you can reset it bt yourself if you are owner of that hosting without any problem

  16. #16
    just create another user for that database from mysql tab, then you should adjust the connection properties with that new user on your script/software

  17. #17
    Join Date
    Sep 2007
    Location
    In ur heart
    Posts
    111

    Solution

    Hi,

    If you are having your server root login details then follow following steps carefully from shell.

    1st login in to shell as root user now run command( For example I am using site/domain name as test.com and user test.

    /scripts/whoowns test.com

    It will give you user name, now switch to user account.

    cd ~test/public_html
    or
    cd /home/test/public_htm
    l

    Now you are in test user home directory under which all hosting files are present.

    Run command to search database user and password.

    grep test_ * -R -l

    Above command will show you all files under which database name/user name is defined.

    Now you have to open config file, you have received after running above command.

    One config file open search for database user name and password.

    login in to cPanel select mysql database feature and add database user with the password which you have found out in config files and reassigned privilege for newly added database user to existing database.

    <<snipped>>

    Awaiting for your reply.
    Last edited by bear; 01-02-2011 at 10:44 AM.

  18. #18
    Join Date
    Aug 2009
    Location
    New Delhi
    Posts
    633
    It is strange that you can not reset the mysql password from cpanel.
    Why shouldn't I be able to do that if I have created the user through cpanel?
    Looks like a feature suggestion for cpanel.
    Qtriangle - Website development and web hosting solutions
    The very best of PHP/MySQL development services

  19. #19
    Hi,
    If you lost your root SQL password there is an option in WHM to change it.

    Dylan,

  20. #20
    Can anyone please tell me what happens if I REMOVE those two passwords from that file? What apps on the system actually use or rely on them?

  21. #21
    Join Date
    Jan 2002
    Location
    USA
    Posts
    4,548
    Is the database being used by any active scripts?

    Could you not, I don't know... just look into the configuration (config.php) of said script to obtain current MySQL password?

    Example, if you lost your database details for a Wordpress blog, just look up the details in the config.php and save yourself the hassle of having to change that exact same line of information after you've made the update.
    vpsBoard - An active resource for all things Virtual Private Servers. Tutorials, Guides, Offers and more!
    Come join the conversation! 90,000 posts and growing daily! The fastest growing hosting forum around!

  22. #22
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    10,482
    The database does not physically have a password, it is the user assigned to the database that uses the password, if you are using cPanel simply remove the user from the database and then re-create that user with another password.

    You can change the passwords as required within phpMyAdmin or view the config.php as recommended.
    l Dedigeeks (Twitter) • Shared • Reseller • Cloud VPS • Since 2010
    l Leading AU Hosting Provider • Multiple locations - around the globe!
    l cPanel/WHM • R1Soft Backups • 24/7/365 Support • 99.9% Uptime Guarantee
    l www.yourcompanynamehere.com • Customer Service Rep. • Superior Service Guarantee

  23. #23

    How to login to mySql

    Simply log into WHM and scroll down and find SQL Services. In that section you will find a link to reset your root password for MySQL.

    Kindly,

    If you dont have access to cpanel and you're just trying to reset a passwod for a a local dbuser. Log into cpanel and go to databases. From there you can just change the password for the db user.

  24. #24
    Simply log into WHM and scroll down and find SQL Services. In that section you will find a link to reset your root password for MySQL.

  25. #25
    so if users need to reset their mysql password trough their cpanel they need to know the old password? this is just plain stupid.

  26. #26
    Join Date
    Oct 2002
    Location
    Middle Dearth
    Posts
    22,645
    Quote Originally Posted by magucr View Post
    so if users need to reset their mysql password trough their cpanel they need to know the old password? this is just plain stupid.
    Cpanel/WHM password is not the same as the mysql root pass.
    Having problems, or maybe questions about WHT? Head over to the help desk!

  27. #27
    Quote Originally Posted by bear View Post
    Cpanel/WHM password is not the same as the mysql root pass.
    huh? and whos saying that?

  28. #28
    When you click on change password, there is a buttom called sync passwords with mysql, click that and then job done,

    OR

    You can do what another user has said and make a new user in mysql.

  29. #29
    I know that, thanks but I am not asking for help, I am just criticizing the fact that you have to know the old password in order to reset it. It does not make any sense.

    Also, It is not a good idea to have both cpanel and mysql passwords synchronized, It's actually a documented security issue.

  30. #30
    login to cpanel and from there change the pass word easily, of your db username, you can change all the passwords, if you can solve it, re create the mysql database..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •