mysql_pconnect can not work after change password/username

tyuuu

Well-Known Member
Oct 16, 2005
56
0
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
 

tyuuu

Well-Known Member
Oct 16, 2005
56
0
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
 

tyuuu

Well-Known Member
Oct 16, 2005
56
0
156
Hi,

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

thanks
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
797
152
168
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 ?
 

tyuuu

Well-Known Member
Oct 16, 2005
56
0
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
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
797
152
168
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.
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,995
645
263
Houston
cPanel Access Level
DataCenter Provider
I think this suggestion:
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.
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!
 

tyuuu

Well-Known Member
Oct 16, 2005
56
0
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