本文共 816 字,大约阅读时间需要 2 分钟。
数据库的维护和性能优化包括:
mysqldump -u root -p company t_dept > c:\t_dept_back.sql
mysqldump -u root -p --databases company test > c:\database_company_back.sql
mysqldump -u root -p --all-databases > c:\all_databases_back.sql
(2) 通过命令mysql实现数据还原
mysql -u root -p company < c:\t_dept_back.sql
(3) 实现数据库表导出到文本文件
select * from t_dept into outfile 'c:/t_dept.txt';# 格式化select * from t_dept into outfile 'c:/t_dept.txt' fields terminated by '\、' optionally enclosed by '\"' lines starting by '\>' terminated by '\r\n';
mysql -u root -proot -e"select * from t_dept" company > c:/t_dept.txt
转载地址:http://vpnca.baihongyu.com/