The “dump.sql” is not a database, it is a file, typically with CREATE TABLE and INSERT INTO queries.
So essentially the series of commands are something like
write a file of queries that can be used to replicate the database in the state it is in at the time of the dump.
create a database so there will be something to import the dump file into.
import the dump file into the database.
In case you haven’t understood, “db1” should be the name of the database you want to export. “dump” can be named anything, I usually include a date eg. “mydb20180624.sql” but you can name it whatever makes the most sense for you. “db2” should be the name of your new database. In other words, “db1”, “dump” and “db2” are used to represent the actual names you will be using.
[quote]
Also these commands are to be ran from your command line, not from within MySQL. They are command line programs, not queries[/quote]
Can I change the commands to SQL with your help?
If you have MySQL installed the tools should be in its bin folder or there abouts. Not always so easy to find them and the system path can be a bit of a chore to type into the power shell to get to them.
If you already have the mysql shell CLI in your start menu you can look at its properties to see where it points to. Other tools, such as mysqldump are likely in the same location.