Skip to content

Instantly share code, notes, and snippets.

@shankar-bavan
Last active December 25, 2022 14:30
Show Gist options
  • Save shankar-bavan/9fd19c65e55245cf48344ebe59c636c9 to your computer and use it in GitHub Desktop.
Save shankar-bavan/9fd19c65e55245cf48344ebe59c636c9 to your computer and use it in GitHub Desktop.
import a mysql database using cmd prompt in XAMPP for Windows
  • Locate the mysql executable (C:\Programs\xampp\mysql\bin\mysql.exe )
  • Copy the path in the clipboard as you will need it in the next step.
  • To import a database we just need to execute the following command with the following arguments:
mysql -u {DATABASE_USERNAME} -p {DATABASE_NAME} < "path/to/file/database-to-import.sql"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment