• 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

The website can still be interrupted when the hosting infrastructure is attacked
Network

The website can still be interrupted when the hosting infrastructure is attacked

December 1, 2026
AnonyViet LLM – Summary of 125 Prompt Jailbreak AI, Uncensored
Network

AnonyViet LLM – Summary of 125 Prompt Jailbreak AI, Uncensored

November 29, 2026
TOP 10 AI không kiểm duyệt – AI Uncensored mới nhất
Network

TOP 10 AI không kiểm duyệt – AI Uncensored mới nhất

November 28, 2026
Vietnam static residential proxy: How to choose and use the service
Network

Vietnam static residential proxy: How to choose and use the service

November 26, 2026
SSHWATCH: Dashboard to see realtime VPS attacks using Honeypot
Network

SSHWATCH: Dashboard to see realtime VPS attacks using Honeypot

November 23, 2026
Purple Team: How to verify that the monitoring system can actually detect attacks
Network

Purple Team: How to verify that the monitoring system can actually detect attacks

November 23, 2026
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

Recent News

Should I cover the screen in iPhone Duo and how to clean it

Should I cover the screen in iPhone Duo and how to clean it

December 3, 2026
Shortcut to download TikTok videos without logo to replace SnapVideo

Shortcut to download TikTok videos without logo to replace SnapVideo

December 2, 2026
Expense Note

Expense Note

December 2, 2026
Share the latest free IObit Malware Fighter 14 key 2026

Share the latest free IObit Malware Fighter 14 key 2026

December 2, 2026
Should I cover the screen in iPhone Duo and how to clean it

Should I cover the screen in iPhone Duo and how to clean it

December 3, 2026
Shortcut to download TikTok videos without logo to replace SnapVideo

Shortcut to download TikTok videos without logo to replace SnapVideo

December 2, 2026
Expense Note

Expense Note

December 2, 2026
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

Should I cover the screen in iPhone Duo and how to clean it

Should I cover the screen in iPhone Duo and how to clean it

December 3, 2026
Shortcut to download TikTok videos without logo to replace SnapVideo

Shortcut to download TikTok videos without logo to replace SnapVideo

December 2, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

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

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

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