mysql_pconnect can not work after change password/username
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
-
What version of PHP are you running on the new server? PHP: mysql_pconnect - Manual All mysql_ functions were removed in PHP 7+ 0 -
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 0 -
How are you changing it, in cPanel or SSH? 0 -
Hi, i change them via cpanel interface and cpanel's file manager. thanks 0 -
Do you have access to SSH? Can you test the database connection info manually like so: 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 ?0 -
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 0 -
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. 0 -
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!0 -
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 0 -
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! 0
Please sign in to leave a comment.
Comments
10 comments