Error establishing database connection after last shutdown. wait-for-mysql.js error

I see the errors described in Warn: [main/waitForMySQL] waitForMySQL Response: { stdout: '', stderr: '' }

Admin → Error establishing database connection
Site → Error establishing database connection
Adminer → No such file or directory
Mailhog → ✓

Have tried

  • Restart VM – nothing
  • Toggle “Faster Docker Volumes” – without Faster Docker Volumes I just get connection refused
  • Swapping out another sql folder from an older backup – still no database
  • Restarting computer – nothing
  • Running rm -rf /var/run/mysqld/mysqld.* in docker SSH

The site starts up, MySQL version appears but it doesn’t work. When stopping it churns for a while then errors with unable to export database (MySQL failed).

I’d like to continue work on my site but I can’t access it anymore, as a consequence of absolutely nothing. I just turned it off and on again. Maybe I did that in too quick succession? Could that ever be a thing?


VM boot-up logs:

Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-0-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-0-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-1-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-1-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-2-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-2-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-3-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-3-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-3-1\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-3-1\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-3-2\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\custom-1-3-2\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-0-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-0-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-1-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-1-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-2-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-2-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-3-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-3-0\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-3-1\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-3-1\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Loading Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-3-2\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/EnvironmentLoader] Successfully Loaded Environment: C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\environments\flywheel-1-3-2\out\environment.js
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Running\n', stderr: '' }
Nov 28, 2019, 9:55 PM GMT+2 - warn: [main/index] Unhandled Rejection at: Promise  Promise {
  <rejected> { Error: ETIMEDOUT
      at Timeout._onTimeout (C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\app.asar\node_modules\request\request.js:849:19)
      at ontimeout (timers.js:425:11)
      at tryOnTimeout (timers.js:289:5)
      at listOnTimeout (timers.js:252:5)
      at Timer.processTimers (timers.js:212:10) code: 'ETIMEDOUT', connect: true } }  reason:  
{ message: 'ETIMEDOUT',
  stack:
   'Error: ETIMEDOUT\n    at Timeout._onTimeout (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\node_modules\\request\\request.js:849:19)\n    at ontimeout (timers.js:425:11)\n    at tryOnTimeout (timers.js:289:5)\n    at listOnTimeout (timers.js:252:5)\n    at Timer.processTimers (timers.js:212:10)',
  code: 'ETIMEDOUT',
  connect: true }
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/set-docker-env] Getting Docker Machine env.
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/set-docker-env] Received Docker Machine env. export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.94.100:2376"
export DOCKER_CERT_PATH="C:\Users\pc\.docker\machine\machines\local-by-flywheel"
export DOCKER_MACHINE_NAME="local-by-flywheel"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell: 
# eval $("C:\Users\pc\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe" env --shell bash local-by-flywheel)

Nov 28, 2019, 9:55 PM GMT+2 - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, [ 'local-router:1.1', 'flywheel:1.3.2' ] ]
Nov 28, 2019, 9:55 PM GMT+2 - info: [main/docker-machine-fdv] Removing Legacy FDV (CIFS) for Windows
Nov 28, 2019, 9:55 PM GMT+2 - error: [main/docker-machine-fdv] Error removing Legacy FDV (CIFS) for Windows 
{ stderr: '', stdout: '', exitCode: 2, error: null }

Problem site start-up (no Faster Docker Volumes, resulting in connection refused)

Nov 28, 2019, 9:59 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 9:59 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 9:59 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 9:59 PM GMT+2 - warn: [main/SiteModel] wpInstalled not returning "installed" 
{ message: '',
  stack:
   'Error\n    at Object.<anonymous> (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\main\\actions-sites\\wait-for-mysql.js:1:2851)\n    at Generator.next (<anonymous>)\n    at _0x27ef51 (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\main\\actions-sites\\wait-for-mysql.js:1:1405)\n    at process._tickCallback (internal/process/next_tick.js:68:7)' }

Faster Docker Volumes activated, VM restart, problem site start:

Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] NFS Mount Status 
{ mountedPoints: [], mountPoints: [ '/c/Users' ] }
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] Enabling Docker Machine NFS
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] WinNFSd already running
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] Mounting Boot2Docker volumes Attempt number:  1
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] NFS Test Result 
{ stdout:
   'no /usr/local/sbin/rpc.statd found; none killed\r\n/usr/local/sbin/rpcbind is already running\r\n2300\r\nStarting nfs client utilities.\r\nsuccess\r\n',
  stderr: '' }
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] Configure Boot2Docker Result 
{ stdout:
   '#!/bin/sh\r\n#Local by Flywheel NFS\r\nif [ $(grep -c /c/Users /proc/mounts) -gt 0 ]; then sudo umount -f -l /c/Users || true; fi;\r\n\r\nsudo mkdir -p /c/Users\r\n\r\nsudo /usr/local/etc/init.d/nfs-client restart\r\nsudo mount -t nfs -o udp,nolock,soft,async,actimeo=5 192.168.94.1:/c/Users /c/Users\r\n',
  stderr: '' }
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] Run bootlocal.sh Result 
{ stdout:
   'umount: can\'t unmount /c/Users: Invalid argument\r\nstopped /usr/local/sbin/rpc.statd (pid 16912)\r\n/usr/local/sbin/rpcbind is already running\r\n2300\r\nStarting nfs client utilities.\r\n',
  stderr: '' }
Nov 28, 2019, 10:02 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 10:02 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/SiteEnvironmentInterimUpdater] wp-cli.phar is currently cannot exec in a stopped state: unknown. Updating to 2.2.0.
Nov 28, 2019, 10:02 PM GMT+2 - warn: [main/SiteModel] wpInstalled not returning "installed" 
{ message:
   '(HTTP code 409) unexpected - Container 1f372063b180d546f8c1002bfb0e92cf7dbfc575ccf862de266ea654a46b23ff is not running ',
  stack:
   'Error: (HTTP code 409) unexpected - Container 1f372063b180d546f8c1002bfb0e92cf7dbfc575ccf862de266ea654a46b23ff is not running \n    at C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\node_modules\\docker-modem\\lib\\modem.js:239:17\n    at getCause (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\node_modules\\docker-modem\\lib\\modem.js:269:7)\n    at Modem.buildPayload (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\node_modules\\docker-modem\\lib\\modem.js:238:5)\n    at IncomingMessage.<anonymous> (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\node_modules\\docker-modem\\lib\\modem.js:214:14)\n    at IncomingMessage.emit (events.js:187:15)\n    at IncomingMessage.EventEmitter.emit (domain.js:442:20)\n    at endReadableNT (_stream_readable.js:1092:12)\n    at process._tickCallback (internal/process/next_tick.js:63:19)',
  reason: undefined,
  statusCode: 409,
  json:
   { message:
      'Container 1f372063b180d546f8c1002bfb0e92cf7dbfc575ccf862de266ea654a46b23ff is not running' } }
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-machine-fdv] Removing Legacy FDV (CIFS) for Windows
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-router] getRouterContainers()
Nov 28, 2019, 10:02 PM GMT+2 - error: [main/docker-machine-fdv] Error removing Legacy FDV (CIFS) for Windows 
{ stderr: '', stdout: '', exitCode: 2, error: null }
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-router] teardown()
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-router] Removing router container c1acd42c6cb66807efa267fa9025e0f2b6a8215f7e1a44b06464521cd60e8595
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-router] updateProxyManager()
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-router] runContainer()
Nov 28, 2019, 10:02 PM GMT+2 - info: [main/docker-router] reconnectNetwork()
Nov 28, 2019, 10:02 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 10:02 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 10:03 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 10:03 PM GMT+2 - warn: [main/SiteModel] wpInstalled not returning "installed" 
{ message: '',
  stack:
   'Error\n    at Object.<anonymous> (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\main\\actions-sites\\wait-for-mysql.js:1:2851)\n    at Generator.next (<anonymous>)\n    at _0x27ef51 (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\main\\actions-sites\\wait-for-mysql.js:1:1405)\n    at process._tickCallback (internal/process/next_tick.js:68:7)' }

Export DB failure logs

Nov 28, 2019, 10:06 PM GMT+2 - info: [main/stopSite] Stopping site: running mydumper
Nov 28, 2019, 10:06 PM GMT+2 - warn: [main/waitForMySQL] waitForMySQL Response: 
{ stdout: '', stderr: '' }
Nov 28, 2019, 10:06 PM GMT+2 - info: [main/stopSite] Stopping site: stopping container 1f372063b180d546f8c1002bfb0e92cf7dbfc575ccf862de266ea654a46b23ff
Nov 28, 2019, 10:06 PM GMT+2 - error: [main/exportDB]  
{ message: '',
  stack:
   'Error\n    at Object.<anonymous> (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\main\\actions-sites\\wait-for-mysql.js:1:2851)\n    at Generator.next (<anonymous>)\n    at _0x27ef51 (C:\\Users\\pc\\AppData\\Local\\Programs\\local-by-flywheel\\resources\\app.asar\\main\\actions-sites\\wait-for-mysql.js:1:1405)\n    at process._tickCallback (internal/process/next_tick.js:68:7)' }

I was able to use the app/public and app/sql folders to make a .zip that I imported successfully into a new site. After removing the old one so I can use the same domain. There was no discernible defect to the database but then again that’s a guesstimate.

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