[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、使用mysqldump工具备份,更灵活地控制备份内容,例如,可以单独备份几个表或库。
[root@localhost ~]# mysqldump -u root -p123456 --databases info > /opt/info.sql #对info库进行备份[root@localhost ~]# ls /opt/info.sql
以上就是mysql常见的备份方法是什么的详细内容。
