Home > Database > Mysql Tutorial > Mysql数据库维护语句_MySQL

Mysql数据库维护语句_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:34:55
Original
1462 people have browsed it

bitsCN.com

Mysql数据库维护语句

 

1.修改表名

Sql代码  

alter table t1 rename to t1_back_20130502  

 

2.导出结构

Sql代码  

mysqldump -h192.168.1.1 -uroot -p1234 --default-character-set=utf8 --opt -d -R dbname tablename >d:/data_file_table_130507.sql  

 

 3.再导出数据

Sql代码  

mysqldump -h192.168.1.1 -uroot -p1234    --default-character-set=utf8  -t -c dbname tablename> d:/data_file_data_130507.sql  

 

 4.导入数据

Sql代码  

source D:/data_file_table_130507.sql  

source D:/data_file_data_130507.sql  

bitsCN.com
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template