当前位置:网站首页>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:
至此就结束了,希望可以帮到大家!
边栏推荐
- DataSimba推出微信小程序,DataNuza接受全场景考验? | StartDT Hackathon
- 6. About JWT
- Short selling, overprinting and stock keeping, Oriental selection actually sold 2.66 million books in Tiktok in one month
- The highest level of anonymity in C language
- 【Base64笔记】「建议收藏」
- Cadre de validation des données Apache bval réutilisé
- Reuse of data validation framework Apache bval
- RISCV64
- 數據驗證框架 Apache BVal 再使用
- 如何给“不卖笔”的晨光估值?
猜你喜欢

Calculation of torque target value (ftorque) in servo torque control mode

Skills of embedded C language program debugging and macro use

3. About cookies
![[C language] string function](/img/6c/c77e8ed5bf383b7c656f45b361940f.png)
[C language] string function

CVPR 2022丨学习用于小样本语义分割的非目标知识

我感觉被骗了,微信内测 “大小号” 功能,同一手机号可注册两个微信

DeSci:去中心化科学是Web3.0的新趋势?

伺服力矩控制模式下的力矩目标值(fTorque)计算
![[information security laws and regulations] review](/img/da/c9318ea8999c3ee629b0e48ab78581.png)
[information security laws and regulations] review

行业案例|数字化经营底座助力寿险行业转型
随机推荐
【Unity Shader】插入Pass实现模型遮挡X光透视效果
Five network IO models
Standard ACL and extended ACL
【Base64笔记】「建议收藏」
10 schemes to ensure interface data security
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
C语言中匿名的最高境界
Save the memory of the model! Meta & UC Berkeley proposed memvit. The modeling time support is 30 times longer than the existing model, and the calculation amount is only increased by 4.5%
我感觉被骗了,微信内测 “大小号” 功能,同一手机号可注册两个微信
RISCV64
How much does it cost to develop a small program mall?
The moveposition function of rigidbody2d of unity2d solves the problem of people or screen jitter when moving
6.关于jwt
Complete e-commerce system
Simple configuration of single arm routing and layer 3 switching
脑洞从何而来?加州大学最新研究:有创造力的人神经连接会「抄近道」
How to choose the appropriate automated testing tools?
Short selling, overprinting and stock keeping, Oriental selection actually sold 2.66 million books in Tiktok in one month
Realize payment function in applet
Embedded interview questions (algorithm part)