1. cmd下切换到 mysql 安装目录例F:\mysql-5.7.17-winx64\bin
前提:mysql用户root密码为空.
2. 输入mysql -u root mysql
3. mysql> 状态下输入 SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
回显Query OK, 0 rows affected (0.00 sec)
修改成功!
1. cmd下切换到 mysql 安装目录例F:\mysql-5.7.17-winx64\bin
前提:mysql用户root密码为空.
2. 输入mysql -u root mysql
3. mysql> 状态下输入 SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
回显Query OK, 0 rows affected (0.00 sec)
修改成功!