Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

mysql_pconnect can not work after change password/username

Discussion in 'Database Discussion' started by tyuuu, Jun 19, 2018.

  1. tyuuu

    tyuuu Well-Known Member

    Joined:
    Oct 16, 2005
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    i move an account from other hosting provider,
    and restore entire account,
    the pages load well.

    but when i try to modify mysql database name or user or password,
    and update to mysql_pconnect setting,
    the pages can not works at all.

    i want to ask if i need modify any setting to let the mysql_pconnect work well ?

    thanks
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. tyuuu

    tyuuu Well-Known Member

    Joined:
    Oct 16, 2005
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    i run it on php 5.2.

    when i restore the entire cpanel backup,it works,
    but when i try to modify mysql database name or user or password,it can not work any more.

    thanks
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    How are you changing it, in cPanel or SSH?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. tyuuu

    tyuuu Well-Known Member

    Joined:
    Oct 16, 2005
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    i change them via cpanel interface and cpanel's file manager.

    thanks
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Do you have access to SSH? Can you test the database connection info manually like so:

    Code:
    mysql -u $db_user -p $db_name
    After you replace $db_user and $db_name, hit enter, it will prompt you for the password of the user.

    Do you get the MySQL prompt or Access denied ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. tyuuu

    tyuuu Well-Known Member

    Joined:
    Oct 16, 2005
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Hello,

    yes,it load well


    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2949032
    Server version: 5.6.39 MySQL Community Server (GPL)

    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql>


    i just wonder if i need how to let mysql_pconnect reconnect when i change mysql database name or user or password ?


    thanks
     
  8. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Well 2 things I can think of...

    1. You are using opcache which needs to be cleared out, but being on PHP 5.2 I don't think this is it.

    2. Your database user password contains characters that are getting parsed by the PHP script itself which is breaking it. Try using a simpler password with just letters/numbers.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,720
    Likes Received:
    185
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    I think this suggestion:
    Is interesting in this case and I'd like to see if changing the user's password would resolve the issue.

    Otherwise, are you getting a specific error in the php error log in regards to this?

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. tyuuu

    tyuuu Well-Known Member

    Joined:
    Oct 16, 2005
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Hello,

    sorry and thanks to all the help,
    i finally find the issue,
    it is because the site's mysql connect file not just one.
    it store the mysql login info no many files.....

    thanks
     
  11. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,720
    Likes Received:
    185
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @tyuuu

    I see, so it was changed in only one place, not all the locations where the mysql user/pass were changed. Thank you for letting us know how you solved the issue!

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice