zoukankan      html  css  js  c++  java
  • 程序从sqlserver2008搬家到MySQL5.6

    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.6
    datadir = D:mysql-5.6data
    # port = .....
    # server_id = .....
    
    
    
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
    

      

  • 相关阅读:
    selenium webdriver 的环境搭建时注意事项
    python之文件处理
    python的if语句、while循环、for循环
    mysql从库Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'报错处理
    openstack之keystone部署
    网关协议
    HTTP协议
    Openstack keystone组件详解
    jboss服务启动失败报:Error occurred during initialization of VM
    python字典的常用操作
  • 原文地址:https://www.cnblogs.com/Donnnnnn/p/9264306.html
Copyright © 2011-2022 走看看