现象 SQLyog闪退
连接Linux虚拟机中的mysql5.7时,SQLyog闪退,然后连之前可以连接的本地数据库也闪退。。。
遂卸载 原win中的MySQL 8.0.18,改装mysql5.7.35
# 删除之前的Mysql文件后,还是不干净,继续删
sc delete mysql
MySQL5.7出现Your password has expired. To log in you must change it using a client that supports expir
mysql> SET PASSWORD = PASSWORD('root123');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
# 重新连接即可!
测试连接成功,然后连接,闪退!
重新安装
# 1.添加 bin
# 2.在解压目录下创建my.ini
[client]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
# 设置3306端口
port=3306
character_set_server=utf8
# 解压目录
basedir=D:\Javainstall\mysql-5.7.35-winx64
# 解压目录下data目录
datadir=D:\Javainstall\mysql-5.7.35-winx64\data
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[WinMySQLAdmin]
D:\Javainstall\mysql-5.7.35-winx64\bin\mysqld.exe
# 3.
mysqld -install
mysqld --initialize --console
net start mysql
mysql -uroot -p
alter user 'root'@'localhost' identified by 'kk';
flush privileges;
mysql -uroot -p
一定要删除这个文件夹 (找了好久)
C:\Users\Administrator\AppData\Roaming\SQLyog
再次连接,成功,再也不闪退了!