当前位置:网站首页>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:
至此就结束了,希望可以帮到大家!
边栏推荐
- idea彻底卸载安装及配置笔记
- Calculation of torque target value (ftorque) in servo torque control mode
- "Decryption" Huawei machine vision Corps: Huawei is moving up and the industry is moving forward
- Redis的发布与订阅
- A hodgepodge of ICER knowledge points (attached with a large number of topics, which are constantly being updated)
- Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon
- String type, constant type and container type of go language
- Mathematical analysis_ Notes_ Chapter 11: Fourier series
- 如何给“不卖笔”的晨光估值?
- App capture of charles+postern
猜你喜欢
[C language] string function
String type, constant type and container type of go language
抢占周杰伦
Skills of embedded C language program debugging and macro use
Standard ACL and extended ACL
[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
Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon
idea彻底卸载安装及配置笔记
SlashData开发者工具榜首等你而定!!!
SD_ DATA_ RECEIVE_ SHIFT_ REGISTER
随机推荐
Cloud security daily 220707: Cisco Expressway series and telepresence video communication server have found remote attack vulnerabilities and need to be upgraded as soon as possible
国内首次!这家中国企业的语言AI实力被公认全球No.2!仅次于谷歌
idea彻底卸载安装及配置笔记
POJ 1182 :食物链(并查集)[通俗易懂]
线程池和单例模式以及文件操作
Golang client server login
低代码助力企业数字化转型会让程序员失业?
99% of people don't know that privatized deployment is also a permanently free instant messaging software!
体总:安全有序恢复线下体育赛事,力争做到国内赛事应办尽办
[demo] circular queue and conditional lock realize the communication between goroutines
Nat address translation
Recommend free online SMS receiving platform in 2022 (domestic and foreign)
CVPR 2022 - learning non target knowledge for semantic segmentation of small samples
6.关于jwt
前首富,沉迷种田
持续测试(CT)实战经验分享
云安全日报220707:思科Expressway系列和网真视频通信服务器发现远程攻击漏洞,需要尽快升级
Idea completely uninstalls installation and configuration notes
App capture of charles+drony
GSAP animation library