【Jeecg学习记录】数据库大小写不敏感(docker、linux) ——Table ‘jeecg-boot.QRTZ_LOCKS’ doesn’t exist

🌸 原因:数据库大小写不敏感 🌸

  • Jeecg-Boot启动提示:Table ‘jeecg-boot.QRTZ_LOCKS’ doesn’t exist
  • 查看当前mysql的大小写敏感配置
show global variables like '%lower_case%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | OFF   |
| lower_case_table_names | 1     |
+------------------------+-------+

linux系统

  • 若是linux可以直接编辑/etc/mysql/mysql.conf.d/mysqld.cnf文件,在[mysqld]下添加如下:
[mysqld] 
lower_case_table_names=1
  • 保存,重启Mysql服务,若为一下就不会报错了
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | OFF   |
| lower_case_table_names | 1     |
+------------------------+-------+

docker版本

  • docker直接更改mysql重启会启动失败,建议更改端口映射重新起一个实例
  • 在命令后面加上 —— --lower_case_table_names=1
  • 主要语句:3308:3306 不可写反,3308可以任意换
    • docker run -itd --name mysql3308 -p 3308:3306 -e MYSQL_ROOT_PASSWORD=admin -d mysql --lower_case_table_names=1
  • 我的实例记录
chen@192 ~ % docker run -itd --name mysql3308 -p 3308:3306 -e MYSQL_ROOT_PASSWORD=admin -d mysql --lower_case_table_names=1
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
a7e17b463b085e17048e78ce1f2a70575e92582ba76b527dc9798427813f9990
chen@192 ~ % docker ps -a                                                                                                  
CONTAINER ID   IMAGE                              COMMAND                  CREATED         STATUS                     PORTS                                                                                              NAMES
a7e17b463b08   mysql                              "docker-entrypoint.s…"   8 seconds ago   Up 7 seconds               33060/tcp, 0.0.0.0:3308->3306/tcp                                                                  mysql3308
b38cc649115d   rabbitmq                           "docker-entrypoint.s…"   3 days ago      Up 3 days                  4369/tcp, 0.0.0.0:5672->5672/tcp, 5671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp   mq
78101acc3e57   zhusaidong/nacos-server-m1:2.0.3   "bin/docker-startup.…"   2 months ago    Exited (255) 2 weeks ago   0.0.0.0:8848->8848/tcp, 0.0.0.0:9848-9849->9848-9849/tcp                                           nacos2.0.3
de6473c438b5   redis:5.0.9                        "docker-entrypoint.s…"   2 months ago    Up 3 days                  0.0.0.0:6379->6379/tcp                                                                             redis
06ff1f28eb63   mysql                              "docker-entrypoint.s…"   2 months ago    Up 3 days                  0.0.0.0:3306->3306/tcp, 33060/tcp                                                                  mysql
chen@192 ~ % docker ps                                                                                                     
CONTAINER ID   IMAGE         COMMAND                  CREATED          STATUS          PORTS                                                                                              NAMES
a7e17b463b08   mysql         "docker-entrypoint.s…"   13 seconds ago   Up 13 seconds   33060/tcp, 0.0.0.0:3308->3306/tcp                                                                  mysql3308
b38cc649115d   rabbitmq      "docker-entrypoint.s…"   3 days ago       Up 3 days       4369/tcp, 0.0.0.0:5672->5672/tcp, 5671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp   mq
de6473c438b5   redis:5.0.9   "docker-entrypoint.s…"   2 months ago     Up 3 days       0.0.0.0:6379->6379/tcp                                                                             redis
06ff1f28eb63   mysql         "docker-entrypoint.s…"   2 months ago     Up 3 days       0.0.0.0:3306->3306/tcp, 33060/tcp                                                                  mysql
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值