1、find / -name my.cnf
一般在/etc/my.conf路径
2、编辑vim my.cnf在最后添加:
lower_case_table_names=1
没有或为0代表区分大小写,1代表不区分大小写
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
character_set_server=utf8symbolic-links=0
log-error=/var/log/mysqld.log
#pid-file=/var/run/mysqld/mysqld.pid
pid-file=/var/run/mysqld/mysqld.pid
lower_case_table_names=1
[client]
default_character_set=utf8
3、重启mysql
systemctl restart mysqld
4、登录网站不行则检查数据库表、数据库配置
数据库配置:
#创建数据库
create database irms_lisa default character set utf8;
#创建用户名
create user irms identified by '1234';
#为用户授权
grant all on 数据库.* to 用户;
#jdbc.propertiess设置
mysql database setting
jdbc.driver=com.mysql.jdbc.Driver#设置ip、端口、数据库
jdbc.url=jdbc:mysql://127.0.0.1:3306/irms_lisa?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&tinyInt1isBit=false
jdbc.userName=用户名
jdbc.passwd=密码
hibernate.showSql=true
hibernate.dialect=org.hibernate.dialect.MySQLDialect