进入File->Setting->Plugins
选择Marketplace选项卡
在顶部搜索框搜索database
点击Database Navigator
旁边的install
(因为我已经安装了,这里就显示installed)
安装完成后重启Pycharm
应该就能在左边或者右边看到Database Browser的快捷方式,点中可以实现拖动到另一边;
如果没有可能是左下角方形图标隐藏了,点击可以显示/隐藏边栏;
还可以在View->Tool Windows中找到它
- 连接
点击DB Browser左上角的“+”,选择要连接的数据库,这里我以MySQL为例
如果是本地的MySQL,只需要输入用户名和密码就行了。点击Test Connection,如果出现可以成功连接的提示就可以点击下方的OK进行连接了
我在Test Connection的时候遇到了时区错误的问题
Cannot connect to "Connection". The server time zone value 'Öйú±ê׼ʱ¼ä' 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.
参考 学习常见问题——PyCharm连接MySql出现时区错误问题 得到了解决