In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
There are many online installation tutorials, basically the same, the installation process may lead to installation failure because of very small details, I also refer to a lot of installation tutorials before the installation is successful, there will be a variety of problems in the installation process, we will find answers to these questions while improving our problem-solving ability, a total of one day.
Installation environment: window10
1. Download the zip installation package at https://dev.mysql.com/downloads/mysql/
Click on this version to install, and then select the bottom "No thanks,just start my download." to download the installation package.
2. Installation
2.1 extract the zip package to the installation directory
(I unzipped at C:\ Program Files\ Mysql\ mysql-8.0.19-winx64)
2.2 configure environment variables
Right-click computer-Properties-Advanced system Settings-Environment variables-New system variable
2.3 configure initialized my.ini files
We found that there is no my.ini file in the unzipped file, so we need to create it ourselves. Add my.ini (create a new text file, change the file type to ini) under the installation root directory, and write to the basic configuration:
[mysqld] # set port 3306 port=3306# set the installation directory of mysql:\\ Program Files\\ Mysql\\ mysql-8.0.19-winx64# set the directory where the data of the mysql database is stored datadir=C:\\ Program Files\\ Mysql\\ mysql-8.0.19-winx64\\ data # the maximum number of connections allowed max_connections=200# allows the number of connections to fail. This is to prevent anyone from attempting to attack the character set used by the max_connect_errors=10# server of the database system from this host. By default, the default storage engine default-storage-engine=INNODB# that UTF8character-set-server=utf8# will use when creating a new table uses the "mysql_native_password" plug-in authentication default_authentication_plugin=mysql_native_ password [MySQL] # to set the mysql client default character set default-character-set=utf8 [client] # setting. Set the port port=3306default-character-set=utf8 used by default when the mysql client connects to the server
3. Install MySQL
During installation, cmd must be run as an administrator, otherwise an error will be reported during installation and the installation will fail.
3.1 initialize the database
Execute the command in the bin directory of the MySQL installation directory:
Mysqld-initialize-console
When the execution is complete, the initial default password of the root user is printed, such as:
C:\ Users\ Administrator > cd C:\ Program Files\ Mysql\ mysql-8.0.19-winx64\ binC:\ Program Files\ Mysql\ mysql-8.0.19-winx64\ bin > mysqld-initialize-- console2018-04-28T15:57:17.087519Z 0 [System] [MY-013169] [Server] C:\ Program Files\ MySQL\ bin\ mysqld.exe (mysqld 8.0.11) initializing of server in progress as process 49842018-04-28T15:57:24.859249Z 5 [Note] [MY-] 010454] [Server] A temporary password is generated for root@localhost: rI5rvf5x5G E2018-04-28T15:57:27.106660Z 0 [System] [MY-013170] [Server] C:\ Program Files\ MySQL\ bin\ mysqld.exe (mysqld 8.0.11) initializing of server has completedC:\ Program Files\ Mysql\ mysql-8.0.19-winx64\ bin >
Be careful! There is a paragraph in the output of the execution: [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: rI5rvf5x5G,E, where the "rI5rvf5x5G,E" after root@localhost: is the initial password (without the first space). You need to remember this password before you change it, and you need to use it for subsequent logins.
If you are cheap, close fast, or don't remember, that's fine. Delete the initialized datadir directory, execute the initialization command again, and it will be regenerated. Of course, you can also use security tools to force you to change your password, and you can do whatever you want.
Reference: https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization-mysqld.html
3.2 installation Services
Execute the command in the bin directory of the installation directory of MySQL:
Mysqld-- install service name
The following service name can be left unwritten, and the default name is mysql. Of course, if you need to install multiple MySQL services on your computer, you can distinguish them with different names, such as mysql3 and mysql5.
After installation, you can start the MySQL service with the command net start mysql, stop the service through net stop mysql, and uninstall the MySQL service with the command sc delete MySQL / mysqld-remove.
4. Change the password
Execute the command in the bin directory where you installed the MySQL directory:
Mysql-u root-p
At this time, you will be prompted to enter the password, remember the initial password of the installation in step 3.1, enter it and log in successfully and enter the MYSQL command mode.
Execute the command in MySQL:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' New password
Change the password, pay attention to the end of the command; be sure to have, this is the syntax of mysql
At this point, the installation and deployment of MySQL is complete.
You can view the default installed database with the command:
Show datebases
Use mysql
Show tables
Mysql > show databases;+-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | sys | +-+ 4 rows in set (0.01 sec) mysql >
These are the details of the mysql8.0.19 installation tutorial, please pay attention to other related articles!
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: 0
*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.