如果不配置mysql配置文件,Activiti启动自动建表Linux系统下默认生成大写的表名,需要配置
etc/my.cnf,在[mysqld]栏下新增lower_case_table_names=1,解决问题
[mysqld]
#
# 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
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
#linux系统默认区分数据库表名的大小写,这里设置为1,与windows系统一样不区分大小写,activiti自动建表时生成小写表名
lower_case_table_names=1
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
datadir=/home/MYProgam/mysql_data
bind-address=192.168.1.230
validate_password_policy=0
validate_password_length=16
validate-password=OFF
character_set_server=utf8
default-storage-engine=INNODB
default-time-zone='+8:00'
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
不同系统中mysql表名存储及大小写是否区分问题:
linux上的mysql默认区分大小写,设置不区分大小写:
1.用root登录,修改etc/my.cnf
2.在[mysqld]的节点下面添加一行lower_case_table_names=1 #表名全部为小写,避免出现大小写敏感
3.重启mysql服务,service mysqld restart 即可
参数含义:
lower_case_table_names: 此参数不可以动态修改,必须重启数据库
lower_case_table_names = 1 表名存储在磁盘是小写的,但是比较的时候是不区分大小写
lower_case_table_names=0 表名存储为给定的大小和比较是区分大小写的
lower_case_table_names=2, 表名存储为给定的大小写但是比较的时候是小写的
unix下lower_case_table_names默认值为 0 .Windows下默认值是 1 .Mac OS X下默认值是 2