Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the common backup method of mysql

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what are the common backup methods of mysql". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the common backup methods of mysql?"

1. Use the tar wrapper folder for backup. The database can save the data folder directly, but it takes up a lot of space and can be compressed and saved in tar packaging.

[root@localhost ~] # systemctl stop mysqld [root@localhost ~] # tar Jcvf / opt/mysql-$ (date +% F). Tar.xz / usr/local/mysql/data/ [root@localhost] # ls / opt/mysql-2021-10-25.tar.xz [root@localhost ~] # systemctl start mysqld

2. Use the mysqldump tool to back up the contents of the backup, for example, you can back up several tables or libraries separately.

[root@localhost ~] # mysqldump-u root-p123456-- databases info > / opt/info.sql # back up the info library [root@localhost ~] # ls / opt/info.sql so far, I believe you have a better understanding of "what are the common backup methods of mysql". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report