Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Import Database Schema

I'm having issues attempting to import a database of 195MB via the command line.

mysql -u root -p [DB_NAME] C:\Users\user_name\Downloads\file.sql

When I run this command all I receive from MySQL is a list of variables and options available.

What am I doing wrong?

Also like to add I'm using a fresh install of XAMPP.

like image 425
Richard Skinner Avatar asked Sep 24 '14 11:09

Richard Skinner


1 Answers

You're missing a <, which means you want to direct the content of the file into mysql.

mysql -u root -p [DB_NAME] < C:\Users\user_name\Downloads\file.sql
like image 59
fancyPants Avatar answered Nov 03 '22 02:11

fancyPants