Home > Database > Mysql Tutorial > 解决mysql下区分表名大小写的问题_MySQL

解决mysql下区分表名大小写的问题_MySQL

WBOY
Release: 2016-06-01 13:28:25
Original
1018 people have browsed it

bitsCN.com

解决mysql下区分表名大小写的问题

 

MySQL在Linux下采用 rpm方式安装后默认是:数据库名与表名/表的别名/变量名是严格区分大小写 

1.用root帐号登录,/etc/mysql/my.cnf中的[mysqld]后添加lower_case_table_names=1

    操作命令: vi /etc/my.cnf

[html] [mysqld]  #  # * Basic Settings  #  user        = mysql  pid-file    = /var/run/mysqld/mysqld.pid  socket      = /var/run/mysqld/mysqld.sock  port        = 3306  basedir     = /usr  datadir     = /var/lib/mysql  tmpdir      = /tmp  lc-messages-dir = /usr/share/mysql  skip-external-locking  lower_case_table_names=1  
Copy after login

按键i 插入 esc保存退出

[html]

使用 service

关闭mysql:service mysql stop  启动mysql : service mysql start
Copy after login

 


bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template