Dump:
mysqldump -u root -p --single-transaction --routines shop > shop.sql
--single-transaction makes a consistent dump of InnoDB tables without locking them. Compress it if it's big:
mysqldump -u root -p --single-transaction shop | gzip > shop.sql.gz
Restore into an existing (empty) database:
mysql -u root -p shop < shop.sql
gunzip < shop.sql.gz | mysql -u root -p shop
On MariaDB the commands are also available as mariadb-dump and mariadb; the mysql names are compatibility aliases.