07-27-2023, 06:01 AM
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.
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.