1.在创建MySQL存储过程是出现了
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
该问题是由于在开始没有加delimiter $造成,导致的
2.在springboot
进行多环境多环境搭建时出现:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
证明数据库没有连接成功原因可能是在你在Dev环境中搭建配置了数据库但没有配置
spring:
profiles:
active: dev
3.在向数据库添加数据时出现
Incorrect string value: '\xF0\x9F\x90\xBB' for column 'nickName' at row 1
其原因是数据库的字符编码有问题,在插入中文时字节数不能对应
4.id没有默认字段
Field ‘id’ doesn’t have a default value
该问题为在添加数据时的sql语句没有加id字段导致,数据库添加时默认id自增,但是数据库却没有设置自增属性导致