mysql5.7.20安装全解

C:\Windows\system32>mysqld --initialize --console
2018-01-12T09:36:54.704083Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-01-12T09:36:55.177153Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-01-12T09:36:55.386758Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 20a64d7d-f77c-11e7-98e2-3c970efb98fa.
2018-01-12T09:36:55.437302Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-01-12T09:36:55.453322Z 1 [Note] A temporary password is generated for root@localhost: uPspiji6tT/j


C:\Windows\system32>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。




C:\Windows\system32>net stop mysql
MySQL 服务正在停止.
MySQL 服务已成功停止。




C:\Windows\system32>mysql
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)


C:\Windows\system32>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。




C:\Windows\system32>mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20 MySQL Community Server (GPL)


Copyright (c) 2000, 2017, 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> use mysql
Database changed
mysql> quit
Bye


C:\Windows\system32>mysql -uroot -p
Enter password: ************
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.20 MySQL Community Server (GPL)


Copyright (c) 2000, 2017, 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> set password for root@localhost = password('123456');
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
mysql>
mysql>
mysql>
mysql> flush privileges
    -> ;
Query OK, 0 rows affected (0.01 sec)


mysql> ^C
mysql>  set password for root@localhost = password('123456');
Query OK, 0 rows affected, 1 warning (0.00 sec)


mysql> quit

Bye







开始参考https://www.cnblogs.com/scofield-yang/p/8010829.html

猜你喜欢

转载自blog.csdn.net/wendenggo/article/details/79046662