中间那段报错是因为第一次在data文件夹里面生成文件了,所以会报错
(记得一定用管理员身份运行cmd不然会报错)
6、在执行如下两条命令完成安装
mysqld install
net start mysql
安装完后查看error 日志红色为默认密码。
2017-08-02T05:19:34.830669Z 0 [Warning] InnoDB: New logfiles created, LSN=45790
2017-08-02T05:19:35.827224Z 0 [Warning] InnoDB: Creatingforeign key constraint system tables.
2017-08-02T05:19:36.155385Z 0 [Warning] No existing UUIDhas been found, so we assume that this is the first time that this server hasbeen started. Generating a new UUID: 2cd21090-7742-11e7-953c-507b9de19f84.
2017-08-02T05:19:36.202484Z 0 [Warning] Gtid table is notready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-08-02T05:19:36.202484Z 1 [Note] A temporary passwordis generated for root@localhost: kQrFq?Fti2,m
7、使用如下命令修改默认密码mysqladmin -u root -p password
也可以进入到mysql里面去修改密码
set password for root@localhost = password(‘123456’);
8、登录mysql 查看是否安装成功