Home  >  Q&A  >  body text

How to run a SQL file containing multiple databases (schema) from Mysql shell?

I used Mysql Workbench to export multiple schemas into a 2GB sql file. Now, I want to import it.

The problem is that in the examples I've seen so far, the commands are for each mode:

mysql -h hostname -u user database < path/to/test.sql

My file contains many tables from multiple schemas.

How to run? It's too large to paste into Mysql Workbench, or run from a program.

P粉194541072P粉194541072204 days ago277

reply all(1)I'll reply

  • P粉738821035

    P粉7388210352024-03-30 00:56:19

    Three choices:

    reply
    0
  • Cancelreply