mysqldump -uroot -paStr45?c moodle   --max_allowed_packet=2048M  --ignore-table=moodle.mdl_logstore_standard_log --ignore-table=moodle.mdl_notifications --ignore-table=moodle.mdl_question_attempts --ignore-table=moodle.mdl_question_attempt_step_data --ignore-table=moodle.mdl_question_attempt_steps> /home/backup-13042022.sql
mysqldump -uroot -paStr45?c --no-data moodle  mdl_logstore_standard_log mdl_notifications mdl_question_attempts mdl_question_attempt_steps  mdl_question_attempt_step_data >> /home/backup-13042022-log.sql
CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
grant all privileges on moodle.* to 'moodleuser'@'localhost' identified by 'Aeiytr48!';
flush privileges;

Depuis mysql8

grant alter,create,delete,drop,index,insert,select,update,trigger,alter routine,
create routine, execute, create temporary tables on nextcloud.* to 'nextclouduser';