• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

Backup and Restore MySQL Database with command (Command)

AnonyViet by AnonyViet
January 27, 2023
in Network
0

Backing up data is an integral part of a Database administrator. Hence the work backup (backup) MySQL database regularly is necessary. Most of you often use phpmyadmin to backup or restore.

You can simplify by use command in terminal To backup and restore, follow the instructions below:

General notes in commands:

[uname] : user database
[dbname] : Tên database
[bk.sql] : Tên file backup sẽ được tạo ra
[--opt] : Các tùy chọn thêm của lệnh

Join the channel Telegram of the AnonyViet 👉 Link 👈

1. Backup by command in Terminal (backup)

Use the following structure:

$ mysqldump --opt -u [uname] -p [dbname] > [bk.sql]

Eg : To backup database Duyquangnet

$ mysqldump -u root -p duyquangnet > bk_duyquangnet.sql

You can also customize the backup separately from the table by selecting the table to backup with the command below:

$ mysqldump -u root -p duyquangnet table_a table_b > bk_duyquangnet.sql

Back up MySQL Database automatically compresses

If your database is too large, you can let it automatically compress to reduce the size, we can use the compression command structure with gzip

$ mysqldump -u [uname] -p [dbname] | gzip -9 > [bk_duyquangnet.sql.gz]

2. Restore MySQL Database

The command below is used to Restore, used in case your Database has a problem or error, and you want to restore the previous version.

Requirements: Must have a file backup database (in item 1)

$ mysql -u [uname] -p [dbname] < [backupfile.sql]

Example: Restore database Duyquangnet

$ mysql -u root -p duyquangnet < bk_duyquangnet.sql

Recover a pre-compressed database

gunzip < [backupfile.sql.gz] | mysql -u [uname] -p [dbname]

If you have an already created database, then use the mysqlimport command to restore. The command structure is as follows:

mysqlimport -u [uname] -p [dbname] [bk.sql]
Tags: BackupCommandDatabaseMySQLrestore
Previous Post

How to Turn Off Comments on Facebook Posts

Next Post

How to change your SIM PIN to help prevent thieves from using your phone’s SIM

AnonyViet

AnonyViet

Related Posts

Guide to self -creation socket5 on Ubuntu
Network

Guide to self -creation socket5 on Ubuntu

May 28, 2025
How to create a separate mtproto proxy to use Telegram when blocked
Network

How to create a separate mtproto proxy to use Telegram when blocked

May 25, 2025
Script backup database and website on telegram
Network

Script backup database and website on telegram

May 2, 2025
Create 64GB RAM 16 core for free on Google IDX
Network

Create 64GB RAM 16 core for free on Google IDX

April 13, 2025
What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?
Network

What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?

February 17, 2025
Create Ronin wallet to play pixels on VPS Windows
Network

Create Ronin wallet to play pixels on VPS Windows

February 17, 2025
Next Post
How to change your SIM PIN to help prevent thieves from using your phone’s SIM

How to change your SIM PIN to help prevent thieves from using your phone's SIM

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Đá Gà Online Sonclub Đỉnh Cao Giải Trí 2025

August 22, 2025
How to view web access history in the anonymous mode (Incognito) of Chrome

How to view web access history in the anonymous mode (Incognito) of Chrome

August 22, 2025
How to automatically erase the web history after escaping to absolutely secure

How to automatically erase the web history after escaping to absolutely secure

August 22, 2025
Stainless steel flange price list at Asia Industry

Stainless steel flange price list at Asia Industry

August 21, 2025

Đá Gà Online Sonclub Đỉnh Cao Giải Trí 2025

August 22, 2025
How to view web access history in the anonymous mode (Incognito) of Chrome

How to view web access history in the anonymous mode (Incognito) of Chrome

August 22, 2025
How to automatically erase the web history after escaping to absolutely secure

How to automatically erase the web history after escaping to absolutely secure

August 22, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Đá Gà Online Sonclub Đỉnh Cao Giải Trí 2025

August 22, 2025
How to view web access history in the anonymous mode (Incognito) of Chrome

How to view web access history in the anonymous mode (Incognito) of Chrome

August 22, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply