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

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

WBOY
WBOYOriginal
2016-06-01 13:28:251019browse

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  

 

 

按键i 插入 esc保存退出

 

[html] 

使用 service 

关闭mysql:service mysql stop  启动mysql : service mysql start

 


bitsCN.com
Statement:
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