1、 mysql配置文件(my.ini):


[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
transaction-isolation=READ-COMMITTED
binlog_format=row
log-bin-trust-function-creators = 1


CODE


如果是5.7

optimizer_switch = derived_merge=off
CODE


如果有这一行就删除掉:

// remove this if it exists
sql_mode = NO_AUTO_VALUE_ON_ZERO
CODE


2、生成数据库和用户

//生成数据库
CREATE DATABASE jiradb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

//生成用户并且给权限
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jiradb.* TO 'jirauser'@'%' IDENTIFIED BY '<password>';

flush privileges;  
CODE


3、安装Mysql驱动

下载驱动:  Database JDBC Drivers (匹配版本).

解压后,找到驱动文件:mysql-connector-java-5.1.xx-bin.jar

把驱动文件复制到 <installation-directory>/jira/WEB-INF/lib directory.