Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
1. Create new Local site :
Multisite: Subdirectories 2. Create db backup from WP Engine 3. Import resulting .sql file to app/public (at C:\Users\Username\Local Sites\site-name\app\public) 4. Use “open site shell” to open wp-cli 5. Use wp-cli command to import db
wp db import mysql.sql 6. Receive error message:
Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061) 7. Try again, this time stipulating Port listed on Local’s db tab:
wp db import mysql.sql --ssh=10061 8. Receive error
Error: Cannot connect over SSH using provided configuration.
System Details
Local Version:
Version 8.2.0+6554
Operating System (OS) and OS version:
Win 11 Enterprise
23H2
Local Logs
Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](
(see attached) local-logs.zip (33.4 KB)
I do sometimes run Docker, however even after stopping all Docker containers this problem persists.
Likewise I do have antivirus and firewall applications running, however other Local sites have been able to run – in fact, the site I’m trying to do the import on is running, it is just currently empty because I can’t import the db – so my question is what should I be looking for in firewall / security settings? What would block an import but not connectivity?
I have tried to specify a port in the import command, using the port shown in the Local database pane like this:
wp db import mysql.sql --ssh=10061