Which are the minimum privileges required to get a backup of a MySQL database schema? I am interested only on the schema, not on the data.
Are SELECT privileges required?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
According to the MySQL Documentation
mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW for dumped views, TRIGGER for dumped triggers, and LOCK TABLES if the --single-transaction option is not used. Certain options might require other privileges as noted in the option descriptions.
Thus, to run
mysqldump --no-data --routines --triggers ...
the privileges required are
You will also need the SELECT privilege on
mysql.proc in order to dump Stored Procedures.