当前位置:网站首页>【phpstorm】 No data sources are configured to run this SQL and provide advanced c
【phpstorm】 No data sources are configured to run this SQL and provide advanced c
2022-06-10 20:45:00 【游戏编程】
前言
第一次在phpstorm连接数据库, 我已经在conn尝试连接了数据库并且也被提示连接无错误.
但是把conn导入到其他文件不仅不能用, 而且所有sql语句都标黄了.

不过我基本猜到了是数据库的问题.
一、尝试解决
刚开始它也不能写PHP, 然后就去File-Setting里配置了PHP, 我就想这次能不能也如法炮制去配置一下MySQL呢:

先是把路径引导到mysql.exe, 之后又引导到mysqld.exe, 很遗憾全都没用…
唯一变化的就是sql语句里的 result 变成了红色.
这不是更严重了吗…
解决方法
编辑器右上角点击 database , 呼出database添加面板:

正常情况下这里该是没有数据库的, 空白.

这时候点击:

添加数据库, 选取你要使用哪种数据库:

之后在弹出面板中输入数据库相关信息, 应用即可:

这样可以排除数据库连接上的问题.
作者:白瑕
游戏编程,一个游戏开发收藏夹~
如果图片长时间未显示,请使用Chrome内核浏览器。
边栏推荐
- Redis cache breakdown
- Signal and system review 1
- Realize OSD reverse color on YUV image according to background color
- Intelligent robot making progress in imitation learning
- [nk] 牛客月賽51 G計算題
- SQL Server row to column (pivot), column to row (unpivot)
- 在YUV图像上根据背景色实现OSD反色
- 旋转菜单2.0
- Introduction to database system -- Chapter 1 -- Introduction (important knowledge points)
- Course design of imitation pottery ticket of wechat applet
猜你喜欢
随机推荐
Redis cache avalanche
在模仿学习中进步的智能机器人
Notes to entry: do I need to know programming for O & M?
Mysql之将查询结果插入到其它表中
C language -- 4 first-time constant
H265 Nalu类型判断及 sps 数据解析
Leetcode advanced path - the first unique character in a string
Self made table
系统重装以及查询系统性能
NFT版权/版税
If else is too easy to use? (understanding this article will further improve your logic)
[nk] 牛客月赛51 G计算题
About type-C
CentOS7安装MySQL8的超级详细教程(无坑!)
protoc protoc-gen-go protobuf 之间的关系
PMP candidates, there are these places for PMP examination in Shenzhen in June 2022
标配双安全气囊,价格屠夫长安Lumin 4.89万起售
What should be paid attention to when designing Multilayer PCB?
As a programmer, is it really that important for the underlying principles?
C language learning review -- 1 basic knowledge review









