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 Ser
You do not need to specify the name of the database on the command line if the .sql file contains CREATE DATABASE IF NOT EXISTS db_name and USE db_name statements.
Just make sure you are connecting with a user that has the permissions to create the database, if the database mentioned in the .sql file does not exist.