当前位置:网站首页>cmd命令进入MySQL时报服务名或者命令错误(傻瓜式教学)
cmd命令进入MySQL时报服务名或者命令错误(傻瓜式教学)
2022-07-07 17:01:00 【感冒不能喝咖啡!】
cmd操作MySQL遇到的错误及解决方法
1.遇到的错误
当我们想用cmd命令(不管是不是以管理员的身份运行都有错误)窗口进入本地MySQL,或者使用net start mysql命令启动MySQL,又或者是用mysql -u root -p对MySQL进行操作时,总是会报出下面的错误:
不是内部命令或者是服务名无效
2.出现错误的原因
最有可能的就是在自己安装MySQL后没有去配置环境变量.重新配置一下变量就行
3.解决方法
3.1 直接使用路径进行操作
找到自己当时安装的MySQL的路径,找到bin目录
进入bin目录后复制红框中的路径:
打开cmd命令窗口直接复制cd + 该路径,就可以输入账号密码进入MySQL了
3.2 配置环境变量
1.在桌面此电脑上右键单击,进入属性
2.进入后就是下面页面,再点击高级系统设置
3.点击环境变量
3.在系统变量这块里面双击Path
4.先点击新建,然后将3.1里面的目录添加进去
5.,最后猛点下方的确定就行
4.再次验证(配置完环境变量后)
以管理员身份运行cmd窗口,操作MySQL:
以非管理员身份运行cmd窗口,操作MySQL:
至此就结束了,希望可以帮到大家!
边栏推荐
猜你喜欢

String type, constant type and container type of go language

2022上半年朋友圈都在传的10本书,找到了

Nunjuks template engine

伺服力矩控制模式下的力矩目标值(fTorque)计算

GSAP animation library
![[Blue Bridge Cup training 100 questions] sort scratch from small to large. Blue Bridge Cup scratch competition special prediction programming question centralized training simulation exercise question](/img/08/5f4b4e2700606554516807c01454fd.png)
[Blue Bridge Cup training 100 questions] sort scratch from small to large. Blue Bridge Cup scratch competition special prediction programming question centralized training simulation exercise question

How to choose the appropriate automated testing tools?

Reinforcement learning - learning notes 8 | Q-learning

链式二叉树的基本操作(C语言实现)

Cadre de validation des données Apache bval réutilisé
随机推荐
清华、剑桥、UIC联合推出首个中文事实核查数据集:基于证据、涵盖医疗社会等多个领域
SD_ DATA_ SEND_ SHIFT_ REGISTER
Comparison and selection of kubernetes Devops CD Tools
如何选择合适的自动化测试工具?
高温火烧浑不怕,钟薛高想留清白在人间
2022-07-04 matlab reads video frames and saves them
Interview vipshop internship testing post, Tiktok internship testing post [true submission]
How to implement safety practice in software development stage
6. About JWT
99% of people don't know that privatized deployment is also a permanently free instant messaging software!
[Tawang methodology] Tawang 3W consumption strategy - U & a research method
CVPR 2022丨学习用于小样本语义分割的非目标知识
[unity shader] insert pass to realize the X-ray perspective effect of model occlusion
RIP和OSPF的区别和配置命令
Scientists have observed for the first time that the "electron vortex" helps to design more efficient electronic products
低代码助力企业数字化转型会让程序员失业?
PTA 1102 教超冠军卷
初识缓存以及ehcache初体验「建议收藏」
ES6笔记一
Review of network attack and defense