博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
程序从sqlserver2008搬家到MySQL5.6
阅读量:7090 次
发布时间:2019-06-28

本文共 1427 字,大约阅读时间需要 4 分钟。

 

1、数据表结构的搬家

SqlServer的建表sql语句在MySQL中肯定不能运行

这里使用转换工具

下载地址:

https://download.csdn.net/download/zhutouaizhuwxd/10519813

 

使用说明:

https://www.cnblogs.com/miantiaoandrew/p/7511834.html

 

需要注意的是:视图并不能从sqlserver转换过来,需要在MySQL中手动建立

 

2、MySQL导出表结构和数据

MySQL是可以把表结构和视图一起导出到sql脚本的

 

需要注意的是:

如果现有有三个视图,编号1、2、3

第1个视图依赖第2个视图,也就是需要先执行视图2,才能执行视图1,

需要在导出的sql脚本中,手动更换创建视图的前后位置,不然执行不了

 

3、执行SQL脚本中文乱码

在MySQL安装路径下,找到my.ini文件,

 

有的是mydefault.ini,就把mydefault.ini复制(复制)一份,改名为my.ini,

增加client标签,配置编码格式为utf8,在mysqld标签下配置编码utf8,如下图红色字体所示:

# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the# *** default location during install, and will be replaced if you# *** upgrade to a newer version of MySQL.[client]default-character-set=utf8[mysqld]character_set_server=utf8# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin# These are commonly set, remove the # and set as required.basedir = D:\mysql-5.6datadir = D:\mysql-5.6\data# port = .....# server_id = .....sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

  

 

转载于:https://www.cnblogs.com/Donnnnnn/p/9264306.html

你可能感兴趣的文章
Linux之Web服务(2)Httpd服务配置之四
查看>>
Linux启动时间的极限优化
查看>>
我的友情链接
查看>>
python使用itertools的groupby来处理数据
查看>>
Greenplum升级与扩容记录
查看>>
Linux学习记录--文件|目录的默认权限与隐藏权限
查看>>
安装Linux系统常见的引导方式
查看>>
Eova DIY Formatter 奇技赢巧
查看>>
eclipse 相关
查看>>
SQL向NoSQL转变 关系型数据库的局限性
查看>>
nginx访问web界面验证
查看>>
SpringMVC的工作原理
查看>>
关于struts2中ActionContext的实现原理
查看>>
博客的第一篇文章!祝福我吧!
查看>>
Hyper-V centos 全屏
查看>>
LAMP平台的搭建和网站的防盗链
查看>>
iptables详解
查看>>
【遇到问题】v$session_longops视图
查看>>
LAMP - MySQL的root密码重置
查看>>
asp连接access,增删改查
查看>>