mysql5.7 decompressed version installation

mysql5.7 decompressed version installation package: https://pan.baidu.com/s/1smTisNz Click to open the link

After decompression, configure it to the bin directory under the path in the environment variable ;

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. all rights reserved.
C:\WINDOWS\system32>e:
E:\>CD E:\Doo\mysql-5.7.15-winx64\bin
E:\Doo\mysql-5.7.15-winx64\bin> mysqld install
Service successfully installed.

E:\Doo\mysql-5.7.15-winx64\bin> net start mysql
MySQL service is starting.
MySQL service cannot be started.
The service did not report any errors.
Please type NET HELPMSG 3534 for more help.


Then rename the my-default.ini file to my.ini and move it to
E:\Doo\mysql-5.7.15-winx64\bin> mysqld --initialize --user=mysql --console
2017-12 -12T09:12:21.546970Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-12-12T09:12:22.090384Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-12-12T09:12:22.151545Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-12-12T09:12:22.220756Z 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: 8fc4bd9e-df1c-11e7-a262-1866da1cf58e.
2017-12-12T09:12:22.225773Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-12-12T09:12:22.233763Z 1 [Note] A temporary password is generated for root@localhost: Glkq2Y7=lvf/

E:\Doo\mysql-5.7.15-winx64\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。

记住上面自动生成的密码,登录:
E:\Doo\mysql-5.7.15-winx64\bin>mysql -uroot -pGlkq2Y7=lvf/
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 17
Server version: 5.7.15
Copyright (c) 2000, 2016, 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=password('root');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> exit
Bye

新密码登录:
E:\Doo\mysql-5.7.15-winx64\bin>mysql -uroot -proot
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 18
Server version: 5.7.15 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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> exit
Bye

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325595542&siteId=291194637