mysql数据迁移步骤整理---从windows到linux
来源:互联网 发布:库里杜兰特知乎 编辑:程序博客网 时间:2024/05/17 18:17
①切换到windows的mysql的bin目录下:
#C:\Users\Administrator>cd C:\Program Files\MySQL\MySQL Server 5.0\bin
②导出数据库(比如我的flowpay库)到文件data.txt
#C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqldump -u root -p flowpay > c:data.txt
#Enter password: ******
可以在bin目录下找到data.txt:
③ 上传data.txt到linux的/usr/local/software/data目录下:
④登陆mysql--->创建数据库flowpay----导入数据
[root@iZwz98zujb2gwm1mreemviZ software]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.6.37 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
mysql> create database flowpay;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| flowpay |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)
mysql> use flowpay;
Database changed
mysql> source /usr/local/software/data/data.txt
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.02 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 9 rows affected (0.00 sec)
Records: 9 Duplicates: 0 Warnings: 0
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.02 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.05 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 1 row affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> show tables;
+---------------------+
| Tables_in_flowpay |
+---------------------+
| t_sys_flow_pkg |
| t_sys_module |
| t_sys_order_history |
| t_sys_user |
+---------------------+
4 rows in set (0.00 sec)
mysql> select * from t_sys_flow_pkg;
+----+----------+----------------+-------------+
| id | flow_pkg | official_price | local_price |
+----+----------+----------------+-------------+
| 1 | 30M | 5.00 | 4.62 |
| 2 | 150M | 20.00 | 18.50 |
| 3 | 500M | 30.00 | 28.50 |
| 4 | 1G | 50.00 | 45.50 |
| 5 | 2G | 70.00 | 65.50 |
| 6 | 3G | 100.00 | 94.50 |
| 7 | 4G | 130.00 | 124.50 |
| 8 | 6G | 180.00 | 174.50 |
| 9 | 11G | 280.00 | 270.00 |
+----+----------+----------------+-------------+
9 rows in set (0.00 sec)
mysql>
- mysql数据迁移步骤整理---从windows到linux
- 将mysql数据从Windows迁移到Linux中
- MySQL数据库从windows迁移到linux
- MySQL数据库从windows迁移到linux
- 从linux迁移svn数据到windows
- mysql数据库从windows迁移到linux,或者linux迁移到windows教程
- 从windows到LinuxSVN数据迁移小结
- 从mssql迁移数据到mysql
- PostgreSQL 数据迁移 (从Mysql到Postgres)
- 数据迁移,从mysql到Oracle
- GoldenGate从oracle迁移数据到mysql
- Svn从windows迁移到 linux
- Oracle数据库迁移--->从Windows到Linux
- SVN服务器从Windows迁移到LInux
- 项目从windows迁移到linux注意事项
- SVN服务器从Windows迁移到LInux
- MYSQL数据库从Windows向Linux迁移
- windows上mysql数据库迁移到linux
- POJ3525/LA3890 Most Distant Point from the Sea 解题报告【计算几何】【二分答案】【半平面交】
- Ubuntu连接投影仪时,分辨率不匹配引起的错误
- //.properties的读取方式,就是用Properties对象.load(inputStream)然后再用po操作key,value即可,其实本质下就是将流load到properties对象进
- OpenJ_POJ
- HashMap的存储结构及原理
- mysql数据迁移步骤整理---从windows到linux
- Hibernate-主键映射之主键生成策略
- Poj 1654 Area 计算面积 解题报告
- 自定义UDF函数应用异常
- ubuntu16.04 安装chrome浏览器并设置自动代理
- MySQL必知必会 学习笔记二
- Netfilter 和 iptables关系
- c++模板概述
- JavaScript对象总概