IDEA連接MySQL可視化工具連接操作入下所示:
填寫完成后,點擊測試連接,連接成功如圖所示點擊OK即可
報告錯誤(如圖所示):[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up. java.net.ConnectException: Connection refused: connect.
解決方案:搜索框中輸出CMD,以管理員身份運行,在命令提示符中輸入:net start mysql。成功啟動后方可連接。
報告錯誤(如圖所示):Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.
解決方案:win+R,鍵入cmd打開命令提示符,登錄mysql,鍵入?set global time_zone = '+8:00';方可連接成功