Cannot access to database in PHP 7.4.1 neither open site shell

Issue Summary

Unable to create new site and connect to database with PHP 7.4.1

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    New sites with 7.4.1 or old ones upgraded are not able to connect to database with open adminer. Open site shell is closing automatically.

In bash:

WP-CLI:   WP-CLI 2.5.0-alpha
Composer: 1.10.8 2020-06-24
PHP:      7.4.1
MySQL:    mysql  Ver 8.0.16 for Linux on x86_64 (MySQL Community Server - GPL)
----
Launching shell: /usr/bin/bash ...
awk: /home/jrrodriguez/.config/Local/lightning-services/php-7.4.1+14/bin/linux/shared-libs/libm.so.6: version `GLIBC_2.29' not found (required by awk)
awk: /home/jrrodriguez/.config/Local/lightning-services/php-7.4.1+14/bin/linux/shared-libs/libm.so.6: version `GLIBC_2.29' not found (required by awk)

In zsh:

WP-CLI:   WP-CLI 2.5.0-alpha
Composer: 1.10.8 2020-06-24
PHP:      7.4.1
MySQL:    mysql  Ver 8.0.16 for Linux on x86_64 (MySQL Community Server - GPL)
----
Launching shell: /usr/bin/zsh ...
/usr/bin/zsh: /home/jrrodriguez/.config/Local/lightning-services/php-7.4.1+14/bin/linux/shared-libs/libm.so.6: version `GLIBC_2.29' not found (required by /usr/bin/zsh)
  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes

Replication

Create new site with PHP Version 7.4.1, nginx 1.16.0, MySQL 8.0.16, WPMultisite (Y-subdomain).

System Details

  • Which version of Local is being used?

    • 5.9.9+5246
  • What Operating System (OS) and OS version is being used?

    • Ubuntu 20.04.2 LTS
  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

I don’t have any answers for you, but I would just like to bump this issue.

I’m on Pop OS (ubuntu based) version 20.04.

Summary
New and old sites using php version 7.4 or 8.0 have the following issues:

  1. Cannot connect to adminer.
  2. Cannot open site shell

Regarding adminer:
Using the Local interface Database > Connect > Open Adminer opens the browser to http://localhost:10006/?username=root&db=local like normal, but I get an error like this:

localhost refused to connect
ERR_CONNECTION_REFUSED

Regarding site shell:
Right clicking on site and clicking open site shell opens up a shell that prints out the lines:

WP-CLI:   (version number)
Composer: (version number)

But it closes immediately (within less than half a second) so I can’t see the exact numbers or take a screenshot of it.

What ‘fixes’ the issue:
Switching PHP version to 7.3.5. For some reason, when I switch to PHP version 7.3.5 everything works like a charm.

Local version
5.10.1+5267

Lightning Log
(This is after switching from php version 7.3.5 to 7.4.1)

{"thread":"main","class":"SiteProvisionerService","message":"Creating site folders...","level":"info","timestamp":"2021-03-20T19:51:46.624Z"}
{"thread":"main","class":"SiteProvisionerService","message":"Copying service config templates...","level":"info","timestamp":"2021-03-20T19:51:46.647Z"}
{"thread":"main","class":"Process","process":"mailhog","pid":19286,"level":"info","message":"Killing process","timestamp":"2021-03-20T19:51:46.660Z"}
{"thread":"main","class":"Process","process":"mysql","pid":19293,"level":"info","message":"Killing process","timestamp":"2021-03-20T19:51:46.669Z"}
{"thread":"main","class":"Process","process":"nginx","pid":19294,"level":"info","message":"Killing process","timestamp":"2021-03-20T19:51:46.676Z"}
{"thread":"main","class":"Process","process":"phpFpm","pid":19295,"level":"info","message":"Killing process","timestamp":"2021-03-20T19:51:46.682Z"}
{"thread":"main","reason":{},"p":{},"level":"warn","message":"Unhandled Rejection.","timestamp":"2021-03-20T19:51:46.691Z"}
{"thread":"main","class":"ConfigTemplatesService","message":"Compiling service configs...","level":"info","timestamp":"2021-03-20T19:51:47.680Z"}
{"thread":"main","class":"ConfigTemplatesService","message":"Compiling service configs...","level":"info","timestamp":"2021-03-20T19:51:47.747Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-20T19:51:47.923117Z 0 [System] [MY-010116] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+5/bin/linux/bin/mysqld (mysqld 8.0.16) starting as process 19396","timestamp":"2021-03-20T19:51:48.350Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-20T19:51:47.923892Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","timestamp":"2021-03-20T19:51:48.351Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-20T19:51:48.308867Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","timestamp":"2021-03-20T19:51:48.351Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2021-03-20T19:51:48.350307Z 0 [System] [MY-010931] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+5/bin/linux/bin/mysqld: ready for connections. Version: '8.0.16'  socket: '%%site.runData%%/mysql/mysqld.sock'  port: 10003  MySQL Community Server - GPL.","timestamp":"2021-03-20T19:51:48.352Z"}
{"thread":"main","class":"Process","process":"nginx","pid":19361,"level":"info","message":"Killing process","timestamp":"2021-03-20T19:51:51.932Z"}
{"thread":"main","class":"WordPressInstaller","message":"Init WordPressInstaller","level":"info","timestamp":"2021-03-20T19:51:51.952Z"}

Other
Opening site shell also produces this error in logs/php/error.log

[20-Mar-2021 19:33:52 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[20-Mar-2021 19:33:52 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[20-Mar-2021 19:33:52 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[20-Mar-2021 19:33:52 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[20-Mar-2021 19:33:52 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[20-Mar-2021 19:33:52 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (fallback through xdebug.client_host/xdebug.client_port) :-(

I too would like to bump this.

I am having the same issues. Ubuntu 20.04, php 7.4.x, mysql 8.x.

Can’t connect to Adminer.

And Thank you @martingcao! I had not thought to downgrade to 7.3.5 which seems to fix the issue.

Sure hope this gets fixed as all my sites run php 7.4 and am soon upgrading to 8.

Paul

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.