当前位置:网站首页>用navicat将mysql数据转化为postgresql
用navicat将mysql数据转化为postgresql
2022-06-13 04:24:00 【ChangYan.】
最近做项目需要使用postgresql,可是之前的数据都是mysql格式,由于一些插入语句不同,直接向postgresql导入.sql文件会报错。下面就利用navicat来进行转化。
首先在navicat里要有mysql数据库和postgresql数据库。如图,我的【本地连接】是mysql的,【huaweiyun】是postgresql的。
如果默认没有postgresql的连接,那么先新建一个连接
然后需要在postgresql中新建一个数据库, 用来存放等会转化过来的数据。比如我就新建了一个名为【edu】的数据库
建好后显示如图。
然后在navicat的上方找到【工具】–> 【数据传输】
然后选择两个数据库的位置。点击【下一步】
选择自定义的表,点击下一步
这页默认配置,先点击【开始】,然后会出现弹框,点击【确定】
等待数据传输完成。大概率不会出现什么问题的,不过汉字比较多的时候会遇到问题,直接终止。(好像是该表超过50条记录里有大量汉字就会报错)
我为了快速部署,直接将报错的表删除,其它的信息是可以正确转化的。(直接删除太暴力了,不提倡,而且会导致原来的mysql数据丢失,个人建议删除前先备份一下原来的mysql里的数据)。 我由于项目不太需要那些有汉字的表,所以就直接删除后再转化就可以完成了,如果你的表里有很多必须的汉字,这里还是建议使用其他办法看看能不能解决。
传输完成后我们可以看到数据都转化成功了

大功告成!
边栏推荐
- String full summary
- Common ways to traverse map sets
- Dagger2学习之Module的应用(二)
- 小程序基础入门(黑马学习笔记)
- Understand the pseudo static configuration to solve the 404 problem of refreshing the page of the deployment project
- Returns the width and height of an element
- Simple static web page + animation (small case)
- 【自动化测试】关于unittest你需要知道的事
- Ionic Cordova command line
- Suffix Automaton
猜你喜欢

Hugo blog building tutorial

Manage PC startup items

Catalan number

Day45. data analysis practice (1): supermarket operation data analysis

2022 ICLR | CONTRASTIVE LEARNING OF IMAGE- AND STRUCTURE BASED REPRESENTATIONS IN DRUG DISCOVERY

Uni app Ali font icon does not display
![[automated test] what you need to know about unittest](/img/7c/b3c50dd9808e4b4a44ef4250604cd0.png)
[automated test] what you need to know about unittest

Common terms of electromagnetic compatibility

Li Kou brush question 647 Palindrome substring

Hugo 博客搭建教程
随机推荐
Notes on software test for programmers -- basic knowledge of software development, operation and maintenance
2022 ICML | Pocket2Mol: Efficient Molecular Sampling Based on 3D Protein Pockets
Summary of webdriver API for web automated testing
Introduction to RFM analysis
Latex operation
Knife4j aggregation 2.0.9 supports automatic refresh of routing documents
建模雜談系列143 數據處理、分析與决策系統開發的梳理
Analyse du principe de mise en œuvre d'un éditeur de texte open source markdown - to - rich
php开发博客系统的首页头部功能实现
Google Chrome browser reports an error: net:: err_ BLOCKED_ BY_ CLIENT
小程序基础入门(黑马学习笔记)
Data analysis report
Intervention analysis + pseudo regression
Answer private message @ Tiantian Wx //2022-6-12 C language 51 single chip microcomputer led analog traffic light
Dumi builds a document blog
Message scrolling JS implementation
Hugo blog building tutorial
一款开源的Markdown转富文本编辑器的实现原理剖析
Collection of wrong questions in soft test -- morning questions in the first half of 2011
Analysis of the implementation principle of an open source markdown to rich text editor