As of Local (6.1.3+5515) - can't access DB via wp-cli

Issue Summary

wp db reset --yes
Error: Failed to get current SQL modes. Reason: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    I am unwilling to run DB reset against other sites but other “wp db check” commands work fine

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

Yes no problem

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

Created new site, right-clicked on Local to Open Site Shell (allowed script to run)
type “wp db reset --yes” → boom

System Details

  • Which version of Local is being used? 6.1.3+5515

  • What Operating System (OS) and OS version is being used? Mac OS X 10.15.7

    • For example: macOS Catalina or Windows 10 Professional
  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

{“thread”:“main”,“class”:“SiteProvisionerService”,“message”:“Creating site folders…”,“level”:“info”,“timestamp”:“2021-10-03T13:20:00.415Z”}
{“thread”:“main”,“class”:“SiteProvisionerService”,“message”:“Copying service config templates…”,“level”:“info”,“timestamp”:“2021-10-03T13:20:00.444Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Compiling service configs…”,“level”:“info”,“timestamp”:“2021-10-03T13:20:00.825Z”}
{“thread”:“main”,“service”:{},“serviceBinVersion”:{},“dataPath”:"%%site.runData%%/mysql/data",“level”:“info”,“message”:“Initializing MySQL datadir…”,“timestamp”:“2021-10-03T13:20:01.003Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Compiling service configs…”,“level”:“info”,“timestamp”:“2021-10-03T13:20:07.402Z”}
{“thread”:“main”,“service”:{},“serviceBinVersion”:{},“message”:“Setting up MySQL user…”,“level”:“info”,“timestamp”:“2021-10-03T13:20:07.831Z”}
{“thread”:“main”,“class”:“HostsFileService”,“level”:“info”,“message”:“Updating hosts with”,“timestamp”:“2021-10-03T13:20:08.430Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:20:07.864019Z 0 [System] [MY-010116] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld (mysqld 8.0.16) starting as process 27562”,“timestamp”:“2021-10-03T13:20:08.750Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:20:07.870583Z 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-10-03T13:20:08.750Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:20:07.872277Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for %%site.runData%%/mysql/data/ is case insensitive”,“timestamp”:“2021-10-03T13:20:08.751Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:20:08.692916Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.”,“timestamp”:“2021-10-03T13:20:08.752Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:20:08.749558Z 0 [System] [MY-010931] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld: ready for connections. Version: ‘8.0.16’ socket: ‘%%site.runData%%/mysql/mysqld.sock’ port: 10074 MySQL Community Server - GPL.”,“timestamp”:“2021-10-03T13:20:08.752Z”}
{“thread”:“main”,“service”:{},“serviceBinVersion”:{},“message”:“Creating MySQL database…”,“level”:“info”,“timestamp”:“2021-10-03T13:20:09.089Z”}
{“thread”:“main”,“class”:“HostsFileService”,“stdout”:“Updating hosts file at /etc/hosts\nUpdated hosts file at /etc/hosts\n”,“stderr”:"",“level”:“info”,“message”:“Updated hosts.”,“timestamp”:“2021-10-03T13:20:16.967Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Init WordPressInstaller”,“level”:“info”,“timestamp”:“2021-10-03T13:20:16.973Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Starting standardInstall()”,“level”:“info”,“timestamp”:“2021-10-03T13:20:16.974Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“maybeGetLatestVersion()”,“level”:“info”,“timestamp”:“2021-10-03T13:20:16.974Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“latestOfflineWpVersion”:“5.8.1”,“level”:“info”,“message”:“Latest offline version info”,“timestamp”:“2021-10-03T13:20:16.975Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“version”:“5.8.1”,“download”:“https://downloads.wordpress.org/release/wordpress-5.8.1.tar.gz",“level”:“info”,“message”:"Latest version info”,“timestamp”:“2021-10-03T13:20:17.100Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Configuring wp-config.php”,“level”:“info”,“timestamp”:“2021-10-03T13:20:23.606Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Installing WordPress”,“level”:“info”,“timestamp”:“2021-10-03T13:20:24.497Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Attempting to delete Akismet and Hello Dolly”,“level”:“info”,“timestamp”:“2021-10-03T13:20:26.697Z”}
{“thread”:“main”,“class”:“WordPressInstaller”,“message”:“Writing salts to wp-config.php”,“level”:“info”,“timestamp”:“2021-10-03T13:20:28.111Z”}
{“thread”:“main”,“class”:“ConfigTemplatesService”,“message”:“Compiling service configs…”,“level”:“info”,“timestamp”:“2021-10-03T13:52:30.660Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“pid”:27566,“level”:“info”,“message”:“Killing process”,“timestamp”:“2021-10-03T13:52:31.001Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:52:31.025899Z 0 [System] [MY-010116] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld (mysqld 8.0.16) starting as process 31819”,“timestamp”:“2021-10-03T13:52:32.777Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:52:31.036675Z 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-10-03T13:52:32.778Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:52:31.038419Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for %%site.runData%%/mysql/data/ is case insensitive”,“timestamp”:“2021-10-03T13:52:32.778Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:52:32.726671Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.”,“timestamp”:“2021-10-03T13:52:32.779Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2021-10-03T13:52:32.776954Z 0 [System] [MY-010931] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld: ready for connections. Version: ‘8.0.16’ socket: ‘%%site.runData%%/mysql/mysqld.sock’ port: 10034 MySQL Community Server - GPL.”,“timestamp”:“2021-10-03T13:52:32.779Z”}

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