1.进入bin目录
2.卸载命令 mysqld --remove
3.检查一下自己的my.ini是否配置正确
#basedir代表自己MySQL的安装根目录
basedir = D:\\MySoftWare\\mysql-5.7.9-winx64
#datadir代表自己MySQL的数据库保存的目录,如果没有在MySQL安装的根目录下新建一个data文件夹
datadir = D:\\MySoftWare\\mysql-5.7.9-winx64\\data
#port代表端口号
port = 3306
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
4. mysqld --initialize
5. mysqld -install
6. net start mysql
7. mysql -u root -p(无权限登录)
8. [mysqld]一行 下面skip-grant-tables
9. mysql -u root -p
10. use mysql
11. update mysql.user set authentication_string=password('root') where user='root';
12. update mysql.user set authentication_string=password('root') where user='root';
11. 修改密码
alter user 'root'@'localhost' identified by 'roottest1';
flush privileges;