在mysql上前前后后花了不少的时间, 写篇博客记录一下
1. Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is
com.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. java.sql.SQLSyntaxErrorException: Unknown database ‘jsp_dp’
这个问题是新版的mysql的变化, 听它的话用`com.mysql.cj.jdbc.Driver’替换一下就ok
2. java.sql.SQLException: The server time zone value ‘unknown’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
时区错误问题,
解决方案1. 使用‘jdbc.url=jdbc:mysql://localhost:3306/demo?serverTimezone=UTC‘
解决方案2. 以管理员身份登陆mysql 执行以下语句
mysql > SET time_zone = ‘+8:00’; #即改为北京时间,东8区, 一劳永逸
mysql> flush privileges; # 立即生效
3. mysql的卸载问题
不要以为 卸载了就真的卸了, 搜篇博客对着做, 又是删注册表又是删隐藏文件的, 本人没有删干净, 电脑的服务里还有之前删过的, 有空再搞
4.XAMPP与mysql的3306端口冲突问题
记录不清, 但网说的单改XAMPP中配置文件绝对行不通, 还需要修改mysql的配置文件, 将端口修改为其他的,