Skip to content

Instantly share code, notes, and snippets.

@8ctopotamus
Last active February 23, 2025 15:29
Show Gist options
  • Save 8ctopotamus/cf3069a8ee076b2c33169b4d42707065 to your computer and use it in GitHub Desktop.
Save 8ctopotamus/cf3069a8ee076b2c33169b4d42707065 to your computer and use it in GitHub Desktop.

Following "manual import" instructions on Windows: https://localwp.com/help-docs/getting-started/how-to-import-a-wordpress-site-into-local/#Manually-Import-a-Local-site.

I get the error when running wp db import db.sql in LocalWP's site shell:

Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

Use this command instead.

mysql -u root -proot local < db.sql

Source: https://community.localwp.com/t/cant-connect-to-mysql-server-on-localhost-10061/42645/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment