I’m trying to import an SQL file that I exported from phpMyAdmin into a MySQL database on a different server using the command line. The file is located on my PC, and when I execute the command to import it, I encounter syntax errors.
I’m using a Windows Server setup and attempted this command:
mydatabase < file.sql
However, it results in errors and fails to execute properly. Do I need to create the database in advance, or is there a different command syntax I should follow to successfully import the SQL file?