MySQL Forums
Forum List  »  MySQL Shell

sqldump with database schema
Posted by: Alain Roger
Date: November 16, 2020 10:03AM


i would like to build a script that make a backup of my database and user under linux.

for that i know how to do a sqldump of the database, however it does not dump the database name itself... so it does not generate a create database xyz... it's only export tables and data from the database itself.

Moreover how to do an export in command line of the users attached to the specific database ?

to export database, i do a sqldump like (it's on local ubuntu desktop) :
mysqldump -h -u root --no-data --column-statistics=0 wpgdpr > wpgdpr_schema.sql

however, it exports only tables and data... nothing about the schema name and the user attached to this database.


Options: ReplyQuote

Written By
sqldump with database schema
November 16, 2020 10:03AM
November 16, 2020 12:18PM
November 16, 2020 02:46PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.