Migrate MySQL 5.7 to 8.0 via mysqldump
Recreate the dump from MySQL 5.7
Personally, I would recreate the dump without mysql schema.
SQL=&quot;SET group_concat_max_len = 1024 * 1024;&quot;
SQL=&quot;${SQL} SELECT GROUP_CONCAT(schema_name separator ' ')&quot;
SQL=&quot;${SQL} FROM information_schema.schemata WHERE schema_name NOT IN&quot;
SQL=&quot;${SQL} ('information_schema','performance_schema','mysql','sys')&quot;
DBLIST=`mysql -u... -p... -AN -e&quot;${SQL}&quot;`
mysqldump -u... -p... -B ${DBLIST} &gt; mydbs.sql

Then, you can load mydbs.sql in the MySQL 8.0 instance.
What about the dump you already have ?
First, find out the lines in the dump where each database starts and the number of line in the dump
grep -in &quot;^USE&quot; mydbs.sql
wc -l &lt; mydbs.sql

As an example, I created a dump from a MySQL 5.7 vagrant instance.
root@LAPTOP-57FSQ99U:~# grep -in &quot;^USE&quot; mydbs.sql
24:USE `DMP492`;
122:USE `DMP551`;
190:USE `DMP579`;
228:USE `abeersul`;
262:USE `dbname`;
292:USE `karma`;
300:USE `mysql`;
1212:USE `pch_prod`;
1220:USE `pchcom_prod`;
1286:USE `tryout`;
root@LAPTOP-57FSQ99U:~# wc -l &lt; mydbs.sql
1341
root@LAPTOP-57FSQ99U:~#

Next, create a new dump. Copy everything above and below the mysql schema
In this case, everything before line 300
Then, copy everything from the first DB after mysql schema
In this case, subtract 1212 (first line of the next DB after the mysql schema) from 1341 (the number of lines in the original dump you made) and add 1. Then copy that number of lines from the bottom of the original dump into the new dump:
head -299 mydbs.sql &gt; newdump.sql
(( LINES = 1341 - 1212 + 1 ))
tail -${LINES} mydbs.sql &gt;&gt; newdump.sql

As a demonstration, note how the new dump will not have the mysql schema
root@LAPTOP-57FSQ99U:~# head -299 mydbs.sql &gt; newdump.sql
root@LAPTOP-57FSQ99U:~# (( LINES = 1341 - 1212 + 1 ))
root@LAPTOP-57FSQ99U:~# tail -${LINES} mydbs.sql &gt;&gt; newdump.sql
root@LAPTOP-57FSQ99U:~# grep -in &quot;^USE&quot; newdump.sql
24:USE `DMP492`;
122:USE `DMP551`;
190:USE `DMP579`;
228:USE `abeersul`;
262:USE `dbname`;
292:USE `karma`;
300:USE `pch_prod`;
308:USE `pchcom_prod`;
374:USE `tryout`;
root@LAPTOP-57FSQ99U:~#

Now, just load newdump.sql into MySQL 8.0