2018-02-09T01:51:43.117196Z 1 [Note] A temporary password is generated for root@localhost: PaFe#w##v6zD
安装mysql
管理员模式打开的cmd中,进入\mysql\bin目录下,输入服务安装命令:
1
mysqld -install
启动服务
安装没有报错情况下,可以选择在windows的服务中手动起服务,也可以命令行起:
1
net start mysql
打印信息:
1 2 3
{lamb} net start mysql MySQL 服务正在启动 . MySQL 服务已经启动成功。
表明mysql服务已经成功启动。
mysql操作
mysql服务启动之后,用root用户登录(密码在前步生成的xxx.err文件中):
1
mysql -uroot -p密码
进入mysql控制台。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
表示成功进入控制台。
修改root密码
控制台下执行:
1
ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';