In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to install MySQL 5.7.17 for WIN8. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
1. Download MySQL Community Server 5.7.17, pay attention to selecting the system type (32-bit / 64-bit)
two。 Extract the MySQL package to the specified directory:
3. Add environment variabl
Right-click-- > my computer-- > Properties-- > Advanced system Settings-- > Environment variables
Create a new system variable:
Variable name: MYSQL_HOME
Variable value: d:\ database\ mysql-5.7.17-winx64
Then add% MYSQL_HOME%\ bin to the end of the path
For example:
D:\ Python27;C:\ Users\ duansf\ Desktop\ vim\ vim80;%MYSQL_HOME%\ bin
4. Register as a windows system service:
You need to execute it at the command prompt (administrator mode):
D:\ database\ mysql-5.7.17-winx64\ bin > d:\ database\ mysql-5.7.17-winx64\ bin\ mysqld install MySQL-- defaults-file= "d:\ database\ mysql-5.7.17-winx64\ my.ini"
Service successfully installed.
The my.ini content is as follows:
[mysql]
# set mysql client default character set
Default-character-set=utf8
[mysqld]
# set port 3306
Port = 3306
# set the installation directory of mysql
Basedir=D:/database/mysql-5.7.17-winx64
# set the storage directory of the data in the mysql database
Datadir=D:/database/mysql-5.7.17-winx64/data
Slow_query_log=TRUE
Slow_query_log_file=d:/slow_query_log.txt
Long_query_time=1
# maximum number of connections allowed
Max_connections=200
# the character set used by the server defaults to the 8-bit coded latin1 character set
Character-set-server=utf8
# default storage engine to be used when creating new tables
Default-storage-engine=INNODB
# Master-Slave replication parameter configuration
Log_bin = mysql-bin
Server_id = 1
5. Start the MySQL service manually:
D:\ database\ mysql-5.7.17-winx64\ bin > net start mysql
The MySQL service is starting..
The MySQL service could not be started.
The service did not report any errors.
Please type NET HELPMSG 3534 for more help.
Failed to start the service manually. After viewing the official information, the solution is as follows:
Before starting, we need to use-initialize to initialize the Data directory generation and generate random passwords, and use-initialize-insecure to generate empty passwords. Default account root
Here we use-initialize-insecure to generate an empty password
D:\ database\ mysql-5.7.17-winx64\ bin > mysqld-- initialize-insecure
D:\ database\ mysql-5.7.17-winx64\ bin > net start mysql
The MySQL service is starting..
The MySQL service has started successfully.
Log in with an empty password:
C:\ Users\ duansf > mysql-u root-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 3
Server version: 5.7.17-log 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 >
Mysql > show databases
+-+
| | Database |
+-+
| | information_schema |
| | mysql |
| | performance_schema |
| | sys |
+-+
4 rows in set (0.00 sec)
Mysql >
6. Change the root password:
Mysql > UPDATE mysql.user SET password=PASSWORD ("123456") WHERE user='root'
ERROR 1054 (42S22): Unknown column 'password' in' field list'
Mysql >
Changing the password reported an error, because there is no Password field in the user table under the new version 5.7 mysql database. Instead, the encrypted user password is stored in the authentication_string field.
The command to change the password is as follows:
Mysql > update MySQL.user set authentication_string=password ('123456') where user='root'
Query OK, 1 row affected, 1 warning (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 1
Mysql >
Mysql >
Mysql > flush privileges
Query OK, 0 rows affected (0.13 sec)
7. Log in with the new password:
D:\ database\ mysql-5.7.17-winx64\ bin > mysql- u root-p
Enter password: *
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 4
Server version: 5.7.17-log 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 >
This is the end of the article on "how to install MySQL 5.7.17 for WIN8". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 265
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.