[MDEV-26241] Exporting to include drop / create database Created: 2021-07-26  Updated: 2021-08-06  Resolved: 2021-08-06

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Simon Platten Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: mysqldump
Environment:

Windows 10



 Description   

I'm using mysqladmin in an attempt to export an existing database, it exports tables, data and stored procedures, the output does not contain any DROP DATABASE or CREATE DATABASE instructions the command line is:
```
"C:/Program Files (x86)/MariaDB 10.5/bin/mysqldump" --skip-comments --compact --lock-tables=false --add-drop-database --host=localhost --user=trainer --password=PASSWORD training > C:/Users/splatten/Documents/TrainerS1D5.sql
```



 Comments   
Comment by Sergei Golubchik [ 2021-08-06 ]

See the documentation:

--add-drop-database Add a DROP DATABASE before each create. Typically used in conjunction with the --all-databases or --databases option because no CREATE DATABASE statements are written unless one of those options is specified.
Generated at Thu Feb 08 09:43:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.