Solution: exceptiole 'xxxxx.QRTZ_LOCKS' doesn't exist and mysql's my.cnf file adds lower_case_table_names and starts reporting an error

解决:com.mysql.cj.jdbc.exceptiole ‘xxxxx.QRTZ_LOCKS’ doesn’t exist

There is this table under our xxxxx library, but the capitalization here is not recognized. We need to change the mysql configuration file.

Add lower_case_table_names=1 below [mysqld] in the content of mysql's my.cnf file

Detailed explanation of the lower_case_table_names parameter:
lower_case_table_names = 0|1
where 0: case-sensitive, 1: case-insensitive
MySQL’s case rules for database names, table names, column names, and aliases under Linux are as follows:
   1. Database name and table name It is strictly case-sensitive;
   2. Table aliases are strictly case-sensitive;
   3. Column names and column aliases are case-insensitive in all cases;
   4. Variable names are also strictly case-sensitive;

Insert image description here

Modify my.cnf startup error:
Insert image description here
mysql has stopped

Step 1, back up the mysql data file and delete all files in the original data

cp -rf 资源位置 目标位置

Insert image description here

Step 2, change the my.cnf configuration file. If the lower_case_table_names configuration was not added before, also add it.

[mysqld]
#bind-address=0.0.0.0
character_set_server=utf8
skip-name-resolve
port=3306
user=mysql
basedir=/home/myqxin/java/mysql
datadir=/home/myqxin/java/mysql/data
socket=/home/myqxin/java/mysql/data/mysql.sock
lower_case_table_names=1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[client]
default-character-set=utf8
port=3306
socket=/home/myqxin/java/mysql/data/mysql.sock

[mysqld_safe]


#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

Step 3, enter the bin directory of mysql and initialize the database

./mysqld --defaults-file=/etc/my.cnf --basedir=/home/myqxin/java/mysql/ --datadir=/home/myqxin/java/mysql/data/ --user=mysql --initialize

After the initialization is completed, an initial password will be automatically generated. Record it first and use it to log in later.
The effect is as follows:

Insert image description here

Step 4, start the Mysql service

# 启动明令
service mysql start
# 停止明令
service mysql stop

The effect is as follows:
Insert image description here
Step 5, enter the bin directory of mysql and log in to mysql (when prompted to enter the password, it is the password we generated during initialization. If you forget it, delete the data directory and start over from that step)

Insert image description here

Step 6, change password

ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

refresh

flush privileges;

Insert image description here
Step 7. Log in with the new password and configure remote access (the above does not allow remote access and needs to be modified to allow remote connections. The steps are as follows)

Insert image description here
Step 8, check if it is case sensitive

show variables like 'lower%'

Insert image description here

Guess you like

Origin blog.csdn.net/qq_45752401/article/details/125536099