DB Error: connect failed


(Mapiiiaji) #1

Dear friends, after upgrade PHP from version 7.2.7 to newer 7.2.8, service stops and appear this error “DB Error: connect failed”. Pleaes help! Thank in advance.


(Anton Raharja) #2

make sure php-mysql also updated and make sure MySQL user can access your database from web

anton


(Mapiiiaji) #3

php-mysql also updated.

“MySQL user can access your database from web”
How to check it? Thank in advance


(Mapiiiaji) #4

php-mysql is also updated. the access level has not changed. Maybe 7.2.8 has an incompatibility with the current version. Because the same situation was until added support 7. Thank in advance


(Anton Raharja) #5

I don’t see any changelog related to mysql:
http://www.php.net/ChangeLog-7.php#7.2.8

anton


(Mapiiiaji) #6

Before upgrade state:

[root@sj45s ~]# playsmsd check
PLAYSMSD_CONF = /etc/playsmsd.conf
PLAYSMS_PATH = /var/www/html
PLAYSMS_LIB = /var/lib/playsms
PLAYSMS_BIN = /usr/local/bin
PLAYSMS_LOG = /var/log/playsms
DAEMON_SLEEP = 1
ERROR_REPORTING = E_ALL ^ (E_NOTICE | E_WARNING)
IS_RUNNING = 1
PIDS schedule = 1749
PIDS ratesmsd = 1751
PIDS dlrssmsd = 1753
PIDS recvsmsd = 1756
PIDS sendsmsd = 1760

[root@sj45s ~]# yum upgrade
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.dc.uz
 * elrepo: ftp.colocall.net
 * epel: epel.scopesky.iq
 * extras: mirror.dc.uz
 * remi-php72: mirror.neolabs.kz
 * remi-safe: mirror.neolabs.kz
 * updates: mirror.dc.uz
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-cli.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-cli.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-common.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-common.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-gd.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-gd.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-json.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-json.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-mbstring.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-mbstring.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-mysqlnd.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-mysqlnd.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-pdo.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-pdo.x86_64 0:7.2.8-1.el7.remi will be an update
---> Package php-xml.x86_64 0:7.2.7-1.el7.remi will be updated
---> Package php-xml.x86_64 0:7.2.8-1.el7.remi will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch         Version                 Repository        Size
================================================================================
Updating:
 php                x86_64       7.2.8-1.el7.remi        remi-php72       3.2 M
 php-cli            x86_64       7.2.8-1.el7.remi        remi-php72       4.8 M
 php-common         x86_64       7.2.8-1.el7.remi        remi-php72       1.1 M
 php-gd             x86_64       7.2.8-1.el7.remi        remi-php72        76 k
 php-json           x86_64       7.2.8-1.el7.remi        remi-php72        62 k
 php-mbstring       x86_64       7.2.8-1.el7.remi        remi-php72       621 k
 php-mysqlnd        x86_64       7.2.8-1.el7.remi        remi-php72       233 k
 php-pdo            x86_64       7.2.8-1.el7.remi        remi-php72       124 k
 php-xml            x86_64       7.2.8-1.el7.remi        remi-php72       204 k

Transaction Summary
================================================================================
Upgrade  9 Packages

Total download size: 10 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/9): php-gd-7.2.8-1.el7.remi.x86_64.rpm                  |  76 kB   00:00     
(2/9): php-mbstring-7.2.8-1.el7.remi.x86_64.rpm            | 621 kB   00:00     
(3/9): php-mysqlnd-7.2.8-1.el7.remi.x86_64.rpm             | 233 kB   00:00     
(4/9): php-pdo-7.2.8-1.el7.remi.x86_64.rpm                 | 124 kB   00:00     
(5/9): php-xml-7.2.8-1.el7.remi.x86_64.rpm                 | 204 kB   00:00     
(6/9): php-7.2.8-1.el7.remi.x86_64.rpm                     | 3.2 MB   00:09     
(7/9): php-common-7.2.8-1.el7.remi.x86_64.rpm              | 1.1 MB   00:13     
(8/9): php-json-7.2.8-1.el7.remi.x86_64.rpm                |  62 kB   00:22     
php-cli-7.2.8-1.el7.remi.x86_6 FAILED                                           
http://mirror.uta.edu.ec/remi/enterprise/7/php72/x86_64/php-cli-7.2.8-1.el7.remi.x86_64.rpm: [Errno 12] Timeout on http://mirror.uta.edu.ec/remi/enterprise/7/php72/x86_64/php-cli-7.2.8-1.el7.remi.x86_64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
(9/9): php-cli-7.2.8-1.el7.remi.x86_64.rpm                 | 4.8 MB   00:03     
--------------------------------------------------------------------------------
Total                                              226 kB/s |  10 MB  00:46     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : php-json-7.2.8-1.el7.remi.x86_64                            1/18 
  Updating   : php-common-7.2.8-1.el7.remi.x86_64                          2/18 
  Updating   : php-cli-7.2.8-1.el7.remi.x86_64                             3/18 
  Updating   : php-pdo-7.2.8-1.el7.remi.x86_64                             4/18 
  Updating   : php-mysqlnd-7.2.8-1.el7.remi.x86_64                         5/18 
  Updating   : php-7.2.8-1.el7.remi.x86_64                                 6/18 
  Updating   : php-mbstring-7.2.8-1.el7.remi.x86_64                        7/18 
  Updating   : php-xml-7.2.8-1.el7.remi.x86_64                             8/18 
  Updating   : php-gd-7.2.8-1.el7.remi.x86_64                              9/18 
  Cleanup    : php-7.2.7-1.el7.remi.x86_64                                10/18 
  Cleanup    : php-cli-7.2.7-1.el7.remi.x86_64                            11/18 
  Cleanup    : php-gd-7.2.7-1.el7.remi.x86_64                             12/18 
  Cleanup    : php-xml-7.2.7-1.el7.remi.x86_64                            13/18 
  Cleanup    : php-mbstring-7.2.7-1.el7.remi.x86_64                       14/18 
  Cleanup    : php-mysqlnd-7.2.7-1.el7.remi.x86_64                        15/18 
  Cleanup    : php-pdo-7.2.7-1.el7.remi.x86_64                            16/18 
  Cleanup    : php-json-7.2.7-1.el7.remi.x86_64                           17/18 
  Cleanup    : php-common-7.2.7-1.el7.remi.x86_64                         18/18 
  Verifying  : php-7.2.8-1.el7.remi.x86_64                                 1/18 
  Verifying  : php-mysqlnd-7.2.8-1.el7.remi.x86_64                         2/18 
  Verifying  : php-mbstring-7.2.8-1.el7.remi.x86_64                        3/18 
  Verifying  : php-common-7.2.8-1.el7.remi.x86_64                          4/18 
  Verifying  : php-xml-7.2.8-1.el7.remi.x86_64                             5/18 
  Verifying  : php-gd-7.2.8-1.el7.remi.x86_64                              6/18 
  Verifying  : php-cli-7.2.8-1.el7.remi.x86_64                             7/18 
  Verifying  : php-json-7.2.8-1.el7.remi.x86_64                            8/18 
  Verifying  : php-pdo-7.2.8-1.el7.remi.x86_64                             9/18 
  Verifying  : php-common-7.2.7-1.el7.remi.x86_64                         10/18 
  Verifying  : php-7.2.7-1.el7.remi.x86_64                                11/18 
  Verifying  : php-pdo-7.2.7-1.el7.remi.x86_64                            12/18 
  Verifying  : php-json-7.2.7-1.el7.remi.x86_64                           13/18 
  Verifying  : php-gd-7.2.7-1.el7.remi.x86_64                             14/18 
  Verifying  : php-cli-7.2.7-1.el7.remi.x86_64                            15/18 
  Verifying  : php-mbstring-7.2.7-1.el7.remi.x86_64                       16/18 
  Verifying  : php-mysqlnd-7.2.7-1.el7.remi.x86_64                        17/18 
  Verifying  : php-xml-7.2.7-1.el7.remi.x86_64                            18/18 

Updated:
  php.x86_64 0:7.2.8-1.el7.remi          php-cli.x86_64 0:7.2.8-1.el7.remi      
  php-common.x86_64 0:7.2.8-1.el7.remi   php-gd.x86_64 0:7.2.8-1.el7.remi       
  php-json.x86_64 0:7.2.8-1.el7.remi     php-mbstring.x86_64 0:7.2.8-1.el7.remi 
  php-mysqlnd.x86_64 0:7.2.8-1.el7.remi  php-pdo.x86_64 0:7.2.8-1.el7.remi      
  php-xml.x86_64 0:7.2.8-1.el7.remi     

Complete!

After instalition:

root@sj45s ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service


(Arjun Dev) #7

First check your database name, username, password carefully, and all the php extension should have same version. if not solved ping me at skype id ‘adev09@gmail.com’


(Mapiiiaji) #8
[root@sj45s outbox]# yum list installed |grep php
php.x86_64                         7.2.7-1.el7.remi               @remi-php72   
php-cli.x86_64                     7.2.7-1.el7.remi               @remi-php72   
php-common.x86_64                  7.2.7-1.el7.remi               @remi-php72   
php-gd.x86_64                      7.2.7-1.el7.remi               @remi-php72   
php-json.x86_64                    7.2.7-1.el7.remi               @remi-php72   
php-mbstring.x86_64                7.2.7-1.el7.remi               @remi-php72   
php-mysqlnd.x86_64                 7.2.7-1.el7.remi               @remi-php72   
php-pdo.x86_64                     7.2.7-1.el7.remi               @remi-php72   
php-xml.x86_64                     7.2.7-1.el7.remi               @remi-php72   
[root@sj45s outbox]# yum update
Dependencies Resolved
================================================================================
 Package            Arch         Version                 Repository        Size
================================================================================
Updating:
 php                x86_64       7.2.8-1.el7.remi        remi-php72       3.2 M
 php-cli            x86_64       7.2.8-1.el7.remi        remi-php72       4.8 M
 php-common         x86_64       7.2.8-1.el7.remi        remi-php72       1.1 M
 php-gd             x86_64       7.2.8-1.el7.remi        remi-php72        76 k
 php-json           x86_64       7.2.8-1.el7.remi        remi-php72        62 k
 php-mbstring       x86_64       7.2.8-1.el7.remi        remi-php72       621 k
 php-mysqlnd        x86_64       7.2.8-1.el7.remi        remi-php72       233 k
 php-pdo            x86_64       7.2.8-1.el7.remi        remi-php72       124 k
 php-xml            x86_64       7.2.8-1.el7.remi        remi-php72       204 k

Transaction Summary
================================================================================
Upgrade  9 Packages

Total download size: 10 M
Is this ok [y/d/N]: 

it’s identical - installed and upgraded php extensions the same

DB login and passwd is the same.