idea連接MySQL数据库
view—>tools window —> database —> Data Source —> MySql点击
会出现错误-----》
Connection to [email protected] failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
解决:试试更改区时(往往问题都是出现在这)
a. 在终端里先使用管理员登录mysql,也就是root
mysql -uroot -p123
b. 输入命令
show variables like ‘%time_zone%’设置完以后,退出mysql,重新登录,检查时间是否被修改