Last active
February 29, 2024 18:28
-
-
Save Korveld/7c379f579ca90d1276d18eb778cf08fe to your computer and use it in GitHub Desktop.
Import an SQL file using the command line in MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysql -u [DATABASE USER] -p [DATABASE NAME] < [PATH TO SQL FILE] | |
| example | |
| mysql -u root -p db_name < "C:/xampp/htdocs/db_file.sql" | |
| MAMP | |
| /applications/MAMP/library/bin/mysql -u user_name -p database_name < /Applications/MAMP/htdocs/database_name.sql | |
| MySQL command line | |
| use short_forms | |
| source E:/work/short_forms/dump_test.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment