mysql5.7修改root密码

来源:互联网 发布:疯狂的赛车结局 知乎 编辑:程序博客网 时间:2024/05/06 04:34
5.7以前有password,5.7之后密码字段名称为authentication_string,所以:



update user set authentication_string = password("*******") where user="root"
或者update user set password= password("*******") where user="root"





cmd直接输入mysql没法进入命令端,而需输入mysql -u root -p后输入密码进入
显示错误:ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

解决方法:配置环境变量,path新增mysql\bin地址,重新启动cmd和mysql服务即可

原创粉丝点击