备忘,mysql5.7.21.zip 安装
2018-03-27 17:01
447 查看
https://www.cnblogs.com/iathanasy/p/8461429.html
大部分参考此链接,感谢作者
Microsoft Windows [版本 10.0.16299.309]
(c) 2017 Microsoft Corporation。保留所有权利。
C:\WINDOWS\system32>mysqld --initialize --user=mysql --console
mysqld: Can't create directory 'C:\WINDOWS\system32\5.7.21-winx64\mysql-5.7.21-winx64\5.7.21-winx64\mysql-5.7.21-winx64\data\' (Errcode: 2 - No such file or directory)
2018-03-27T08:45:37.074606Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-03-27T08:45:37.075319Z 0 [ERROR] Can't find error-message file 'C:\WINDOWS\system32\5.7.21-winx64\mysql-5.7.21-winx64\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2018-03-27T08:45:37.078082Z 0 [ERROR] Aborting
C:\WINDOWS\system32>mysqld --initialize --user=mysql --console
2018-03-27T08:46:58.346546Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-03-27T08:46:58.732169Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-03-27T08:46:58.818093Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-03-27T08:46:58.883764Z 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: 6929c399-319b-11e8-b3bb-086266300787.
2018-03-27T08:46:58.890245Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-03-27T08:46:58.900780Z 1 [Note] A temporary password is generated for root@localhost: u2Pvie+OjRx*
C:\WINDOWS\system32>
C:\WINDOWS\system32>
C:\WINDOWS\system32>cd D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin
C:\WINDOWS\system32>D:
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysqld --install
The service already exists!
The current server installed: "D:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld" Mysql
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysqld --install mysql5.7.21
Service successfully installed.
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>net start mysql5.7.21
mysql5.7.21 服务正在启动 .
mysql5.7.21 服务已经启动成功。
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql -uroot -p
Enter password: ************
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql -P 3326 -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql --port 3326 -uroot -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.21
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> select version();
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> set password for root@localhost=password('XY_CK_3326');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> quit;
Bye
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql --port 3326 -uroot -p
Enter password: **********
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql --port 3326 -uroot -p
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
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> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 5.7.21 |
+-----------+
1 row in set (0.00 sec)
mysql>
大部分参考此链接,感谢作者
Microsoft Windows [版本 10.0.16299.309]
(c) 2017 Microsoft Corporation。保留所有权利。
C:\WINDOWS\system32>mysqld --initialize --user=mysql --console
mysqld: Can't create directory 'C:\WINDOWS\system32\5.7.21-winx64\mysql-5.7.21-winx64\5.7.21-winx64\mysql-5.7.21-winx64\data\' (Errcode: 2 - No such file or directory)
2018-03-27T08:45:37.074606Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-03-27T08:45:37.075319Z 0 [ERROR] Can't find error-message file 'C:\WINDOWS\system32\5.7.21-winx64\mysql-5.7.21-winx64\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2018-03-27T08:45:37.078082Z 0 [ERROR] Aborting
C:\WINDOWS\system32>mysqld --initialize --user=mysql --console
2018-03-27T08:46:58.346546Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-03-27T08:46:58.732169Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-03-27T08:46:58.818093Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-03-27T08:46:58.883764Z 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: 6929c399-319b-11e8-b3bb-086266300787.
2018-03-27T08:46:58.890245Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-03-27T08:46:58.900780Z 1 [Note] A temporary password is generated for root@localhost: u2Pvie+OjRx*
C:\WINDOWS\system32>
C:\WINDOWS\system32>
C:\WINDOWS\system32>cd D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin
C:\WINDOWS\system32>D:
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysqld --install
The service already exists!
The current server installed: "D:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld" Mysql
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysqld --install mysql5.7.21
Service successfully installed.
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>net start mysql5.7.21
mysql5.7.21 服务正在启动 .
mysql5.7.21 服务已经启动成功。
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql -uroot -p
Enter password: ************
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql -P 3326 -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql --port 3326 -uroot -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.21
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> select version();
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> set password for root@localhost=password('XY_CK_3326');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> quit;
Bye
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql --port 3326 -uroot -p
Enter password: **********
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
D:\mysql-5.7.21-winx64\mysql-5.7.21-winx64\bin>mysql --port 3326 -uroot -p
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
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> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 5.7.21 |
+-----------+
1 row in set (0.00 sec)
mysql>
相关文章推荐
- win7环境(x64)安装MySQL 5.7.12出现3534错误解决备忘
- centos安装apache/mysql/php备忘
- ubuntu mysql5.5安装备忘
- linux,nginx,mysql,php安装备忘
- Python 2.6 安装mysql支持(备忘)
- Windows 安装 mysql-5.7.12-winx64(CommunityServer) 备忘
- Debian下使用apt-get安装 Nginx + MySQL + PHPMyAdmin 备忘
- LUNIX下MySql的安装卸载及使用(备忘)
- ubuntu 12.04安装部署环境nginx,tomcat,mysql以及开机启动备忘
- MYSQL 5.0.19在Debian下手工安装备忘
- 安装Apache,MySql,PHP on Ubuntu 备忘
- linux下mysql编译安装方法备忘
- mysql5.7.21.zip安装教程
- Apache+php+mysql+phpMyAdmin安装要点备忘
- CentOS二进制安装Mysql-5.7及以上版本方法
- Mac OS X 下安装MySQL 5.7
- Ubuntu 安装mysql和简单操作
- windows下mysql的安装以及与python的连接
- (转)MySQL安装及配置指南
- mac安装mysql后,启动mysql ERROR 2002 (HY000)错误解决办法