系统为Win10, 并且成功安装Mysql-server
1.在my.ini 文件中添加:skip-grant-tables (添加意义在于可以免去密码验证登录mysql)
2.重启mysql: net stop mysql; (先停止服务) net start mysql(再重新启动服务)
3. 更改mysql root的密码为‘123‘: update mysql.user set authentication_string=password('123') where user='root' ;
4.再次打开my.ini文件更改,删除第一步添加的内容:skip-grant-tables
5.重新停止,重启mysql
6.使用指令 mysql -u root -p 进入mysql
输入自己设置的密码就大功告成啦~