mysql5.7 奇葩问题

来源:互联网 发布:联通网络客服电话 编辑:程序博客网 时间:2024/06/06 16:27

可能是昨晚断电 电脑更新后今天就连不上mysql了

我先查了mysql 的服务 结果发现启动不了 也没有报什么错误

然后我想删了mysql的服务,结果发现不够权限

我权限不熟,所以我又想是localhost没设定吧,所以跑去hosts 哪里修改localhost 127.0.0.1

结果发现我的权限不够

所以我为当前用户 配了最高权限 可以搜百度 的win10最高权限

发现我可以修改hosts 但是要拖到桌面上

修改完还是不行,我浪费了很多时间,发现不如删掉mysql的data文件,初始一个。虽然里面的表都没了。。好心疼

当我想删的时候还是没权限

结果我一个一个的给权限。连cmd 都要run as admin win+r 那种方式不行

mysqld --initialize-insecure

net start mysql

mysql -uroot -p

update mysql.user set authentication=PASSWORD('yourpassword') where user='root';(或者)

update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost'

flush privileges

quit ok了



0 0
原创粉丝点击