项目目的
将原来windows环境中使用phpstudy搭建的mysql 5.5.53 中的数据迁移至新主机Linux环境中
环境情况
新主机
系统平台:
CentOS release 7.4 (Final) 内核 3.10.0-693.el7.x86_64
mysql环境:
mysql> status
Server version: 5.6.39-log MySQL Community Server (GPL)
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
mysql> show variables like '%storage_engine%';
+----------------------------+--------+
| Variable_name | Value |
+----------------------------+--------+
| default_storage_engine | InnoDB |
| default_tmp_storage_engine | InnoDB |
| storage_engine | InnoDB |
+----------------------------+--------+
旧主机:
系统平台:
Windows 2012 R2 SE X64
mysql环境:
Server version: 5.5.53 MySQL Community Server (GPL)
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
mysql> show variables like '%storage_engine%';
+------------------------+--------+
| Variable_name | Value |
+------------------------+--------+
| default_storage_engine | MyISAM |
| storage_engine | MyISAM |
+------------------------+--------+
表的存储引擎
mysql> show table status from database/G;
Engine: InnoDB
Engine: MyISAM
迁移过程
1.使用phpstudy自带的工具进行每个数据库导出
image
我看了,也是用的mysqldump操作的。
2.如果只是保留原本的表引擎,那么直接以下操作即可
mysql> create database zentao;
mysql> use zentao;
mysql> source zentao20180413161534.sql;
mysql> show tables;
+-------------------+
| Tables_in_zentao |
+-------------------+
| zt_action |
| zt_bug |
| zt_build |
...
新闻热点
疑难解答