Perintah Backup & Restore Database Mysql Linux

You are here:
  • KB Home
  • ESET
  • Perintah Backup & Restore Database Mysql Linux

Backup database Mysql dan restore database

1. Perintah backup Database :
mysqldump --host localhost --disable-keys --extended-insert --routines -u root -p nama_db > namafilebackup.sql

2. Proses restore DB

lihat isi database mysql
#Login Database
mysql -u root -p

#Masuk di dalam Mysql Show database
show databases;

# Remove database
drop database data_db;

#Create database

Create database namadatabase_db;

#Perintah Restore database
mysql --host localhost -u root -p era_db < "namadatabase".sql