一、Windows系统
1、知道密码情况下
(1)Win+R进入DOS窗口
(2)输入mysql -uroot -p你的密码
PS:
(1)默认密码为root。
(2)-u与root,-p与密码之间没有空格。
(3)修改密码时提示Unknown column 'password' in 'field list'
因为新版本mysql采用authentication_string替代了password字段
扫描二维码关注公众号,回复:
8724007 查看本文章
(4)SQL整理
mysql -u root -p
Enter password:****
mysql> use mysql; 选择数据库
Database changed
mysql> update user set authentication_string=password('root2') where user='root' ;
mysql> flush privileges;
mysql> quit;
2、不知道密码情况下
(1)、
二、Linux系统
1、
有用请点赞,养成良好习惯!
疑问、交流、鼓励请留言!