Home  >  Q&A  >  body text

mysqlsh dump and load full schema

I want to use mysqlsh to perform the following operations:

  1. Dumps the complete schema of a given database (not just tables, but functions, triggers and everything related to this database schema, same as mysqldump -R DATABASE > DATABASE.sql )
  2. Load this complete schema into the brand new database I just created (something like mysql --database=NEWDATABASE < DATABASE.sql
P粉662802882P粉662802882206 days ago417

reply all(1)I'll reply

  • P粉764785924

    P粉7647859242024-03-27 10:18:17

    I think you can just use a text editor to edit the .sql file before trying to load it.

    This tool actually dumps the schema and imports it to a different MySQL instance, but keeps the schema name the same.

    reply
    0
  • Cancelreply