Home  >  Article  >  Database  >  Mysql数据库维护语句

Mysql数据库维护语句

WBOY
WBOYOriginal
2016-06-07 15:09:45901browse

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 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_f

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

  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

Mysql数据库维护语句

Statement:
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