解决MySQL 8.0 Command Line Client打开闪退的问题

在Mysql安装成功后,我们打开MySQL 8.0 Command Line Client发现1秒闪退,经过多方面的寻找,现将解决办法写在下面:

(1)首先,我们找到MySQL文件夹下的MySQL 8.0 Command Line Client,鼠标右击,选择更多,再点击打开文件位置。

(2)进入位置后,在文件上右击选择属性,找到目标位置。

(3)我的目标位置复制下来是:"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe" "--defaults-file=C:\Program Files\MySQL\MySQL Server 8.0\my.ini" "-uroot" "-p";但是我在这段加粗的文件路径下并没有找到my.ini文件。所以闪退的原因找到了,就是缺失该文件。下面说解决方法。

(4)方法一:先在电脑上搜索一下有没有my.ini文件,如果有,将文件复制到上面加粗的文件路径下,即可解决。

        方法二:如果在电脑上没有找到my.ini文件,那就新建一个文件;将以下代码复制到记事本中,保存后在改名为my.ini。最后在复制到上面加粗的文件路径下,也可以解决。

; Example MySQL config file for medium systems.
;
; This is for a large system with memory of 1G-2G where the system runs mainly
; MySQL.
;
; MySQL programs look for option files in a set of
; locations which depend on the deployment platform.
; You can copy this option file to one of those
; locations. For information about these locations, see:
; http://dev.mysql.com/doc/mysql/en/option-files.html
;
; In this file, you can use all long options that a program supports.
; If you want to know which options a program supports, run the program
; with the "--help" option.
 
; The following options will be passed to all MySQL clients
[client]
;password = your_password
port = 3306
socket = /tmp/mysql.sock
 
; Here follows entries for some specific programs
 
; The MySQL server
[wampmysqld]
;skip-grant-tables
port = 3306
soc

(5)再次打开MySQL 8.0 Command Line Client,正常运行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值