Table ‘zup.Domain_System’ doesn’t exist 首先可以肯定我数据库中是存在这个表的,只是全是小写的,而SpringBoot项目中的是开头大写字母的 在mysql 5.7.x版本中默认是大小写区分的。 可以登录mysql之后查看 lower_case_table_names=0,默认为0,则区分大小写 所以解决方法就是修改mysql中的配置文件,让其忽略大小写: 因为我使用的是docker安装的mysql5.7,并且把配置文件映射到 了: 修改配置文件 添加上: 保存 我在这里就需要重启docker,你如果是直接安装的mysql,可以直接重新mysql即可 可以看到变成了1
问题
### The error occurred while setting parameters ### SQL: SELECT * FROM Domain_System WHERE domain = ? LIMIT 1 ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zup.Domain_System' doesn't exist ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zup.Domain_System' doesn't exist] with root cause
解决问题
show variables like "%case%";
:truedei@truedei:/codeProject$ sudo mysql -h 127.0.0.1 -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or g. Your MySQL connection id is 2 Server version: 5.7.29 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. MySQL [(none)]> show variables like "%case%"; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | lower_case_file_system | OFF | | lower_case_table_names | 0 | +------------------------+-------+ 2 rows in set (0.00 sec) MySQL [(none)]>
/data/mysql/conf/my.conf
my.conf
truedei@truedei:~$ truedei@truedei:~$ sudo vim /data/mysql/conf/my.conf
lower_case_table_names=1
truedei@truedei:~$ truedei@truedei:~$ sudo docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0a122a08125f mysql:5.7.29 "docker-entrypoint.s…" 2 hours ago Up 4 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp mysql57 truedei@truedei:~$ truedei@truedei:~$ truedei@truedei:~$ truedei@truedei:~$ sudo docker restart mysql57 mysql57 truedei@truedei:~$
truedei@truedei:/codeProject$ sudo mysql -h 127.0.0.1 -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or g. Your MySQL connection id is 2 Server version: 5.7.29 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. MySQL [(none)]> MySQL [(none)]> show variables like "%case%"; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | lower_case_file_system | OFF | | lower_case_table_names | 1 | +------------------------+-------+ 2 rows in set (0.00 sec) MySQL [(none)]>
就可以解决此问题
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox网页视频下载器 下载地址: ImovieBox网页视频下载器-最新版本下载
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
阅读和此文章类似的: 全球云计算