Troubleshooting database export error:
mysqldump: Couldn’t execute ‚SHOW VARIABLES LIKE ‚gtid\_mode“: Table ‚performance_schema.session_variables‘ doesn’t exist (1146)
mysql_upgrade -u root -p --force systemctl restart mysql
After this your mysql database export should work.