In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Abstract: this article mainly explains how to install MySQL in Windows environment.
Check to see if MySQL is installed on your computer
Open the cmd window, enter the services.msc command, and wait for the service interface to open:
If the MySQL service can be found in the service, the system already has MySQL installed:
Download and install download
It is recommended to download it on the official website, where you can choose the version you want. The download page on the official website is:
Https://dev.mysql.com/downloads/mysql/
This page displays the latest download version by default. If you need to get the previous version, just click on the link on the right, which is the place in the red box in the picture:
Then you will find that you can choose the version number, the system running environment, and the number of operating system bits to download the appropriate software:
The download link is below:
Installation
The compressed version that does not need to be installed is provided on the official website, so put the downloaded package in the software installation directory, and the direct decompression means that the installation is complete.
Configure configuration environment variables
After unzipping to the installation directory, the next step is to configure the environment variables. Open the system's Control Panel, then find system and Security, then find system, and then find Advanced system Settings on the left side of the interface:
After opening, pop up the advanced tab of the system properties, and find the "environment variable" at the bottom of the tab:
In the pop-up environment variables tab, find the "system variables" area below, click "New", the variable name is "MYSQL_HOME", the variable value is the address in the newly decompressed folder, mine is "D:\ All\ MySQL\ mysql-5.6.44-winx64", click OK to save, as shown in the figure:
Find the "Path" variable in the variable list and click "Edit". In the pop-up interface, click "New" on the right, then fill in "% MYSQL_HOME%\ bin", and click OK to save, as shown in the figure:
Configure system files
Open the folder you just extracted, find the my-default.ini file, copy and name it my.ini, open the my.ini file and modify it to:
[mysqld] # set port 3306 port=3306# set mysql installation directory basedir=D:\ All\ MySQL\ mysql-5.6.44-winx64# set the data storage directory of mysql database datadir=D:\ All\ MySQL\ mysql-5.6.44-winx64\ data# allow the maximum number of connections max_connections=200# allows the number of connections to fail. Max_connect_errors=10# server default character set character-set-server=utf8mb4# imports the default storage engine default-storage-engine=INNODB# settings used when creating a new table into the export folder secure-file-priv=D:\ All\ MySQL\ file# default_authentication_plugindefault_authentication_plugin=mysql_native_password# sql_modesql_mode=NO_ENGINE_SUBSTITUTION STRICT_TRANS_TABLES# explicit_defaults_for_timestampexplicit_defaults_for_timestamp= true [MySQL] # client default character set default-character-set=utf8mb4 [client] # default character set default-character-set=utf8mb4 when a client connects to the server
Configuration service
Open the cmd window with Super Admin privileges, go to the bin folder in the installation directory, and execute the following statement:
Mysqld-initialize-insecure-defaults-file=D:\ All\ MySQL\ mysql-5.6.44-winx64\ my.ini
-- initialize: create a data file directory and system database, and set the root password to a random number.
-- initialize-insecure: create the data file directory and system database, and set the root password to empty.
-- defaults-file: default profile.
Then execute the following statement to install the service:
Mysqld-install
-- remove: delete the service.
-- install: install the service and start it automatically.
-- install-manual: install the service and start it manually.
Then execute the following statement to start the service:
Net start mysql
Net start mysql: start the service.
Net stop mysql: stop the service.
Login test login
Open the cmd window, enter mysql-u root-p to log in with the root user, and then press enter, and you will be prompted to enter the password. Because the password of the root user was set to be empty in the previous configuration, you can log in successfully by entering enter directly:
Modify the password
Enter set password for root@localhost = password ('123456'), and press enter to change the password of the root user to 123456:
Log out using the exit command, and you will need to enter the password you just set for login later.
Summary
The above is the tutorial diagram of installing MySQL in Windows environment introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
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.