当前位置: 首页 > news >正文

做外贸需要做国外的网站吗免费做婚礼邀请函的网站

做外贸需要做国外的网站吗,免费做婚礼邀请函的网站,栾川有做网站的吗,网站常用插件Windows下 MySQL大小写敏感配置zoerywzhou163.com作者#xff1a;Zhouwan2017-3-27最近在window系统下 操作Linux系统下创建的数据库#xff0c;发现有些不对劲#xff0c;比较了半天才发现是大小写敏感的问题造成的。网上搜索了一下#xff0c;解决了这个问题#xff0c;…Windows下 MySQL大小写敏感配置zoerywzhou163.com作者Zhouwan2017-3-27最近在window系统下 操作Linux系统下创建的数据库发现有些不对劲比较了半天才发现是大小写敏感的问题造成的。网上搜索了一下解决了这个问题做个简明扼要的记录。按照网上的说明WINDOWS编辑MySQL安装目录下的my.ini 文件在[mysqld]节下 添加 lower_case_table_names0 (备注为0时大小写敏感为1时大小写不敏感默认为1)可以实现MySql按照建表Sql语句的大小写状态来定义表名。具体操作的时候会发现理论和实践总是有差异的我的MySQL安装路径为C:\Program Files\MySQL\MySQL Server 5.7\bin(网上有的说my.ini配置文件在这个文件夹下)但是my.ini所在的文件路径为C:\ProgramData\MySQL\MySQL Server 5.7\my.ini然后在[mysqld]节下 添加 lower_case_table_names0。配置好文件了去试一下咋样。然后还没重启系统进行测试在另一个博文里看到了官方手册的网址链接按捺不住好奇心去看一下。发现上面的这个配置是不可行的(具体分析见下面的划重点)可能出现的错误可参见这篇求助博文的内容以及下面的讨论http://bbs.csdn.net/topics/391860287(在官网说明的基础上加上我的独家中文解说 O(∩_∩)O~英文好的同学最好直接看英文文档说的比较清楚)How table and database names are stored on disk and used in MySQL is affected by the lower_case_table_names system variable, which you can set when starting mysqld. lower_case_table_names can take the values shown in the following table. This variable does not affect case sensitivity of trigger identifiers. OnUnix, the default value of lower_case_table_names is 0. On Windows, the default value is 1. On OS X, the default value is2.PSmac OS(2012年前称Mac OS X2012年-2016年称OS X)ValueMeaning0Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement. Name comparisons are case sensitive.(总结存储和查询的时候都大小写敏感都要是按照建表时指定的写法)You should not set this variable to 0 if you are running MySQL on a system that has case-insensitive file names (such as Windows or OS X). If you force this variable to 0 with --lower-case-table-names0 on a case-insensitive file system and access MyISAM tablenames using different lettercases, index corruption may result.(此处划重点)1Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL converts all table names to lowercase on storage and lookup. This behavior also applies to database names and table aliases.(总结存储和查询的时候大小写都不敏感都转换为小写字母)2Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons are not case sensitive. This works only on file systems that are not case sensitive! InnoDB table names are stored in lowercase, as for lower_case_table_names1.(总结存储时大小写敏感按照建表时指定的写法查询时都转换为小写字母)1、单平台If you are using MySQL on only one platform, you do not normally have to change the lower_case_table_names variable from its default value.2、跨平台However, you may encounter difficulties if you want totransfer tables between platforms that differ in file system case sensitivity. For example, on Unix, you can have two different tables named my_table and MY_TABLE, but on Windows these two names are considered identical. To avoid data transfer problems arising from lettercase of database or table names, you have two options:(跨平台的MySQL大小写敏感解决方案在此看看官网怎么说~)Use lower_case_table_names1 on all systems. The main disadvantage with this is that when you use SHOW TABLES or SHOW DATABASES, you do not see the names in their original lettercase.Use lower_case_table_names0on Unix and lower_case_table_names2on Windows. This preserves the lettercase of database and table names. The disadvantage of this is that you must ensure that your statements always refer to your database and table names with the correct lettercase on Windows. If you transfer your statements to Unix, where lettercase is significant, they do not work if the lettercase is incorrect.Exception: If you are usingInnoDB tables and you are trying to avoid these data transfer problems, you should set lower_case_table_names to1 on all platforms to force names to be converted to lowercase.有点复杂。。。本来看懂了的又出来了个Exception。。。本来愉悦的心情又down了因为我的table就是InnoDB看了半天想去配置文件大展身手来着。。。好吧那就先不管跨不跨平台了也不管配置文件my.ini了。直接上手使用的话想要区别大小写可以在查询语句的时候加上Binary具体实现如下(此段文字的参考博文http://www.cnblogs.com/softidea/p/6047766.html。在此博文的基础上内容已大幅度精简提炼)参考方案1、在建表时指定大小写敏感MySql默认查询是不区分大小写的,如果需要区分他,必须在建表的时候,Binary标示敏感的属性.CREATE TABLE NAME(name VARCHAR(10)  BINARY);2、 在查询条件的字段名前 加上binary在SQL语句中实现 SELECT * FROM TABLE NAME WHEREBINARY name‘Clip‘;3、 设置字符集使其大小写敏感utf8_general_ci --不区分大小写utf8_bin--区分大小写【设置collate(校对) 。 collate规则*_bin: 表示的是binary case sensitive collation也就是说是区分大小写的*_cs: case sensitive collation区分大小写*_ci: case insensitive collation不区分大小写 】4、可以修改该字段的collation 为 binary比如ALTER TABLE TABLENAME MODIFY COLUMN COLUMNNAME VARCHAR(50) BINARY CHARACTERSET utf8  COLLATE utf8_bin DEFAULT NULL;
http://www.huolong8.cn/news/92639/

相关文章:

  • 360网站图标怎么做百度官网首页下载
  • 做网站软件要钱吗深圳公共资源交易网招标公告
  • 营销型网站套餐手机网站智能管理系统
  • 国际贸易网站有哪些手机app免费制作
  • 深圳网站(建设信科网络)网络营销网站推广方法
  • 网站中的表单怎么做模块式网站制作
  • 海口网站建设呢vs2015可以做网站么
  • 扬州网站建设要多少钱c2c电子商务网站建设
  • 韩国购物网站有哪些动漫网站策划书
  • 自己的网站如何让百度收录今天广州白云新闻
  • 智能网站平台怎么学网站建设
  • 住房和城乡建设部网站住房补贴网站打开慢怎么回事
  • 哪个网站生鲜配送做的好wordpress地址重改
  • 学院评估 网站建设整改网站 地区加关键词
  • 建站网站有哪些分销系统多少钱一套
  • 建设银行宁波分行 招聘网站网络规划设计师和系统架构师哪个好考
  • 凯里做网站百度网站建设推广
  • 有哪个网站可以学做早餐吃的重庆网站建设重庆
  • 一个服务器可以放几个网站互联网行业还能支撑多久
  • 怎么做私人彩票网站笑话网站域名
  • 熊掌号怎么做网站跳转链接建设厅焊工证
  • 路桥建设局网站广州本地新闻
  • 山西房地产网站建设上传网站到百度
  • 网站导出链接查询汉中建设工程招标投标信息网
  • 河源市连平县建设局网站网站建设多少钱一个平台
  • 北京监理协会培训网站兰州网络公司网站
  • 中国十大热门网站网站建设的流程和内容
  • php网站模板免费下载html5网站特效
  • 建网站要钱吗房地产网站解决方案
  • 企业做网站公司排名口碑wordpress服务器如何使用