How to take mysql dump and restore in linux

Backup mysql dump
mysqldump -u username -p dbname > dbname.sql

Backup mysql dump with trigger and rutines
mysqldump -u username -p --routines --triggers dbname > dbname.sql

Backup mysql dump from remote host
mysqldump -u username -p -h remotedb-server-ipaddress dbname > dbname.sql

how to restore/import mysql backup
mysql -u username -p dbname < dbbackup.sql

Post a Comment

Mới hơn Cũ hơn