异常错误:
###Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table ‘mybatis.users’ doesn’t exist
###The error may exist in file [/Users/mk/Desktop/java/www/springboot/target/classes/mybatis/mapper/UserMapper.xml]
###The error may involve defaultParameterMap
###The error occurred while setting parameters
###SQL: select * from users
###Cause: java.sql.SQLSyntaxErrorException: Table ‘mybatis.users’ doesn’t exist
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table ‘mybatis.users’ doesn’t exist] with root cause
错误原因:
如下图,未指定对应的数据库

解决方案:
改成对应的数据库即可
本文介绍了一种常见的MyBatis错误——“Table ‘mybatis.users’ doesn’t exist”,并提供了详细的解决方案。错误通常发生在未正确指定数据库的情况下,解决方法是确保在配置中正确指定了目标数据库。
5780





