您好,欢迎来到伴沃教育。
搜索
您的当前位置:首页mysql(8)

mysql(8)

来源:伴沃教育
使用mysqlhotcopy 对mysql进行备份

在数据库段分配一个专门用于备份的用户

mysql> grant select,reload,lock tables on *.* to 'hotcopyer'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)

[mysqlhotcopy]
interactive-timeout
user=hotcopyer
password=123456
port=3306

开始备份。

[root@localhost ~]# mysqlhotcopy t_girl t_girl_new

Locked 4 tables in 0 seconds.
Flushed tables (`t_girl`.`category`, `t_girl`.`category_part`, `t_girl`.`id`, `t_girl`.`parent`) in 0 seconds.
Copying 22 files...
Copying indices for 0 files...
Unlocked tables.
mysqlhotcopy copied 4 tables (22 files) in 5 seconds (5 seconds overall).

Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务