首页 > 数据库技术 > 详细

Mysql的入门和连接问题

时间:2019-12-03 10:50:41      阅读:201      评论:0      收藏:0      [点我收藏+]

Mysql的连接问题

最近学完了mysql的基础语法,基本上是掌握了mysql的简单运用。

1、入门mysql

我是通过看《漫画sql》入门的,这个视频案例很到位,跟着2倍速学前9章就可以实操了。

这里分享出来链接:https://pan.baidu.com/s/1qGCc4M3RieYbzr_cBP2jPw
提取码:ep7q

2、设计工具

mysql 这个直接在官网上下载,跟着网上配置一下即可。

SQLyog一个图形用户界面,观察起来更直观。

IDEA编译器,可以连接你的mysql,在后面要讲一下。

3、IDEA连接数据库遇到的问题

首先打开IDEA-View-toolsWindow-datebase就可以连接了。

技术分享图片

输入你的User 和 Password即可

but!!!在Test Connection时报错了

① Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ property manually.

翻译一下:服务器返回无效时区。转到“高级”选项卡并手动设置“serverTimezone”属性。

解决:

mysql -u root -p

这里需要输入你的密码

mysql>show variables like ‘%time_zone%‘;

mysql>set global time_zone=‘+8:00‘;

还有一个错误是在网上看到的,这里也写下来:

② The specified user/password combination is rejected:

[HY000][1862] Your password has expired.
To log in you must change it using a client that supports expired passwords.

原因:原因是:

MySQL 5.7.16 introduces password-expiration capability, to enable database administrators to expire account passwords and require users to reset their password.
解决:

mysql -u root -p

这里需要输入你的密码

SET PASSWORD = PASSWORD(‘root‘);

4、成功导入

效果图如下:

技术分享图片

成功,yeah!

Mysql的入门和连接问题

原文:https://www.cnblogs.com/wangzheming35/p/11975086.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!