写一些奇怪的东西找到的奇怪的错误

1:java连接mysql “The server time zone value '?й???????' is unrecognized or represents more than one time zone“错误

在原本的url后面加上?serverTimezone=UTC即可。

2:连接之前要导入一个驱动 下载传送门

把下载好的驱动复制进项目里,然后右键它:找到构建路径,配置构建路径。然后一波操作……好了导入了。

3:啊啊还有 SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL serve错误是因为我们无权访问mysql

登录 mysql(mysql -u root -p

use mysql;

show tables;

select host,user from user;

//可以看到 host 为 localhost,表示mysql只允许本机访问。将这个值改为 % 即可。

update user set host ='%' where user ='root';

执行刷新权限:flush privileges; 

附上帮我解决问题的大佬的博客传送门

啊我又水了一篇博客

日后会随奇怪的东西的进度而实时更新