In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces "Windows Server 2008 how to install MySQL Community Server 5.7.16" related knowledge, in the actual case of the operation process, many people will encounter such a dilemma, then let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
0. Download installation media
We can log in MySQL official website to download installation media, the website is: http://dev.mysql.com/downloads/. I chose the 64-bit archive version "Windows (x86, 64-bit), ZIP Archive."
1. decompression
Unzip the installation media downloaded locally. Then, copy the decompressed folder mysql-5.7.16-winx64 to the installation directory (E packing directory).
2. Set system environment variables
Right-click Computer>> Properties>> Advanced System Properties>> Environment Variables>> Edit Path and add " ;E:\mysql-5.7.16-winx64\bin" at the end to confirm.
3. Create my.ini file and data directory, configure installation path and data storage path
Create the data directory and my.ini under the directory E:\mysql-5.7.16-winx64, and configure the installation path and data storage path in my.ini.
Click here to fold or open
[mysql]
default-character-set=utf8
[mysqld]
max_connections=200
default-storage-engine=INNODB
basedir =E:\mysql-5.7.16-winx64\bin
datadir =E:\mysql-5.7.16-winx64\data
port = 3306
4. To install MySQL service, first run cmd as administrator and switch to MySQL bin directory; next, execute mysqld --initialize-insecure command to initialize data file, where insecure option specifies login without password.
Click here to fold or open
D:\>e:
E:\>cd mysql-5.7.16-winx64
E:\mysql-5.7.16-winx64>cd bin
E:\mysql-5.7.16-winx64\bin>mysqld --initialize-insecure
E:\mysql-5.7.16-winx64\bin>
It should be noted that if the insecure option is not specified, the login password will be randomly generated. Under the E:\mysql-5.7.16-winx64\data folder, there is a hoegh.err file, where hoegh is the host name. Open it and you will see:
2016-10-20T09:34:56.806257Z 1 [Note] A temporary password is generated for root@localhost: p-mcI:ijR6Xg,
where p-mcI:ijR6Xg is the random cipher.
Then, type mysqld --install to install MySQL services
We will see the interface: Server successfully installed, which indicates that MySQL service installation is successful.
Click here to fold or open
E:\mysql-5.7.16-winx64\bin>
E:\mysql-5.7.16-winx64\bin>mysqld --install
Service successfully installed.
E:\mysql-5.7.16-winx64\bin>
5. Start MySQL service
Enter net start mysql and you will see that MySQL service has started successfully. Try logging in to the database as root and viewing the database profile with the show databases command.
Click here to fold or open
E:\mysql-5.7.16-winx64\bin>
E:\mysql-5.7.16-winx64\bin>net start mysql
MySQL service is starting.
MySQL service started successfully.
E:\mysql-5.7.16-winx64\bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.16 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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql>
6. Change root password
To be safe, let's change the root password.
Click here to fold or open
mysql>
mysql> alter user 'root'@'localhost' identified by 'root';
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> exit
Bye
E:\mysql-5.7.16-winx64\bin>mysql -u root -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 4
Server version: 5.7.16 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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql>
"Windows Server 2008 how to install MySQL Community Server 5.7.16" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
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: 278
*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.