简体   繁体   English

MySQL命令行客户端问题+错误2003

[英]MySQL command line client issue + error 2003

Initially, I was able to open MySQL command line client, and when I type the password, error 2003 will flash very quickly and auto close the client. 最初,我能够打开MySQL命令行客户端,当我输入密码时,错误2003将非常迅速地闪烁并自动关闭客户端。

After looking online, I try some of the suggested solution using cmd . 在线查看后,我尝试使用cmd尝试一些建议的解决方案。 From the attach photo you can see that I try mysqld -install and try net start mysql commands but they don't work. 从附加的照片中,您可以看到我尝试mysqld -install并尝试net start mysql命令,但是它们不起作用。

在此处输入图片说明

So I using the control panel to repair MySQL Server 5.7. 因此,我使用控制面板修复MySQL Server 5.7。 Now I can't open MySQL command line client as it will auto close itself. 现在,我无法打开MySQL命令行客户端,因为它会自动关闭。

How do I rectify this issue? 如何纠正此问题? Does reinstalling the whole MySQL works? 重新安装整个MySQL是否可行?

To sum up : 总结一下

1) I can't open MySQL command line client 1)我无法打开MySQL命令行客户端

2) Even if I could, the previous problem can't solve -> error 2003, then autoclose 2)即使可以,以前的问题也无法解决->错误2003,然后自动关闭

Why I need to fix this : - I want to import data from a .sql file, and I used to do that via MySQL command. 为什么需要解决此问题 :-我想从.sql文件导入数据,而我以前是通过MySQL命令来完成的。

Using the cmd go to mysql folder, there should be a subfolder called bin. 使用cmd转到mysql文件夹,应该有一个名为bin的子文件夹。

Now navigate to bin and run mysql -u user -p password where user is your user and password is your password, for example: mysql -u root -p abc123 现在导航到bin并运行mysql -u user -p password ,其中user是您的用户,而password是您的密码,例如: mysql -u root -p abc123

EDIT Oh, I didn't pay enough attention to your screenshot. 编辑哦,我对您的屏幕截图没有足够的重视。 You cannot even start the service? 您甚至无法启动服务?

EDIT2 Nevertheless you should be able to start it manually launching directly from mysql/bin folder. EDIT2不过,您应该能够直接从mysql / bin文件夹手动启动它。

After countless articles on fixing this problem. 经过无数篇文章就解决了这个问题。 My solution to this is reinstalling or reconfigure . 我对此的解决方案是重新安装或重新配置

Edit: Reconfigure the settings to default 编辑:将设置重新配置为默认设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM