LMSouq
database Open

How can I import an SQL file using the command line in MySQL?

JA
Jaylen
1 month ago
3 views
Problem Description
I have a `.sql` file with an export from `phpMyAdmin`. I want to import it into a different server using the command line. I have a [Windows Server 2008][1] R2 installation. I placed the `.sql` file on the ***C drive***, and I tried this command ```lang-none database_name < file.sql ``` It is not working. I get syntax errors. - How can I import this file without a problem? - Do I need to create a database first? [1]: http://en.wikipedia.org/wiki/Windows_Server_2008

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base