Linux连接mysql报错:Access denied for user ‘root’@‘localh
发布时间:2020-12-14 01:16:25 所属栏目:Linux 来源:网络整理
导读:1,在Linux,先进入/etc,修改my.cnf,任意一行加上"skip-grant-tables"。 2,重启MySQL:service mysqld restart 3,use?mysql; update mysql.user set authentication_string=password(‘your new password ‘) where user=‘root‘; 4, flush privileges;
1,在Linux,先进入/etc,修改my.cnf,任意一行加上"skip-grant-tables"。 2,重启MySQL:service mysqld restart 3,use?mysql; update mysql.user set authentication_string=password(‘your new password‘) where user=‘root‘; 4,flush privileges; ?
? ? ? ? exit;
5,重启MySQL:service mysqld restart? (这步可以省略)
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |