当前位置:网站首页>MySQL version upgrade + data migration
MySQL version upgrade + data migration
2022-06-25 23:48:00 【Delusion_ wangx】
Recently, you need to store time types in the database that are accurate to milliseconds , however Mysql5.6 Later versions only support decimal seconds , And my Mysql The version is 5.5, So I started to upgrade my version .
Let's not talk about the whole process here , Say a few details
1、 There are several steps to install the database : download myql 、 initialization mysql( add to data Folder )、 Opening service 、 Login database 、 Operating the database . Most of the students forgot to open the service , When installing a new version of the database, remember to close the previous service and start a new service .
2、 Put your... Before updating data Folder backup , It contains database information , All the databases and database tables you build are in it . After the backup, it is the whole mysql Data deleted by mistake can also be found 
3、mysql5.7 Previous versions my.ini The configuration file , and 5.7 Not anymore , If it needs to be configured, add one by yourself , But it doesn't affect , Don't listen to the various tutorials that you should first create your own installation my.ini file , This file has been added with possible errors , But if you don't add it, you won't make mistakes . Of course, the configuration needs to be changed in the later stage, and it doesn't take much trouble 

4、 After downloading the new version, there is no data file , Open a command prompt as an administrator , Enter the new version of bin Execute under directory mysqld --initialize-insecure --user=mysql It will generate a data Folder . Do not directly copy the previous data file , Even if it is copied, it cannot be used
5、 After installing the new version, migrate the previous database : Just shut down the database service 、 Before mysql Under the path data The database folder and ibdata1 Copy , Paste to new data Next, restart the service . This step needs to be covered ibdata1 file .( Copying database files is not enough ,ibdata1 It's a must , There are data and indexes of each table , Missing will cause the import to fail ) Be careful : Cover ibdata1 Back up files before , Otherwise, it cannot be restored after being overwritten .
边栏推荐
- 4个要点,助力产品管好项目
- Graduation trip | recommended 5-day trip to London
- 18亿像素火星全景超高清NASA放出,非常震撼
- 录屏转gif的好用小工具ScreenToGif,免费又好用!
- Analysis on the control condition and mode of go cooperation overtime exit
- The InputStream stream has been closed, but the file or folder cannot be deleted, indicating that it is occupied by the JVM
- SSL/TLS、对称加密和非对称加密和TLSv1.3
- 权限设计=功能权限+数据权限
- php性能优化
- proxy
猜你喜欢

1.8 billion pixel Mars panorama Ultra HD released by NASA, very shocking

UE4 learning records create a role and control its movement

28 rounds of interviews with 10 companies in two and a half years (including byte, pinduoduo, meituan, Didi...)

Leetcode-1528- rearrange string - hash table - string

后序线索二叉树

史上最简单的录屏转gif小工具LICEcap,要求不高可以试试

Anaconda一文入门笔记

6.常用指令(上)v-cloak,v-once,v-pre
![mysql5.7版本在配置文件my.ini[mysqld]加上skip-grant-tables后无法启动](/img/b2/2b87b3cea1422e2a860f5e0e7dcc40.png)
mysql5.7版本在配置文件my.ini[mysqld]加上skip-grant-tables后无法启动

debezium
随机推荐
平衡二叉树AVL
The InputStream stream has been closed, but the file or folder cannot be deleted, indicating that it is occupied by the JVM
Problems encountered in Doris operation and maintenance
后序线索二叉树
C# IO Stream 流(一)基础概念_基本定义
php socket通信中stream_select方法的理解
B. Box Fitting-CodeCraft-21 and Codeforces Round #711 (Div. 2)
Anaconda一文入门笔记
Jenkins 发布PHP项目代码
Tree class query component
Mutual conversion of float type data and datetime type data in sqlserver2008
28 rounds of interviews with 10 companies in two and a half years (including byte, pinduoduo, meituan, Didi...)
Unable to start debugging. Unexpected GDB output from command “-environment -cd xxx“ No such file or
Analysis on the control condition and mode of go cooperation overtime exit
Database - mongodb
解析產品開發失敗的5個根本原因
Run the dronekit flight control application on Shumei faction under px4-jmavsim software simulation environment
STL教程5-STL基本概念及String和vector使用
PHP interprocess pass file descriptor
213.打家劫舍 II