In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article records the installation and configuration method of mysql 5.7.21. The details are as follows.
1. download
Download address
Just unzip it to a location you like (do not include Chinese in the directory)
For example: d:\ Program Files\
two。 System environment variable configuration
(1) add system variables
Variable name: MYSQL_HOME
Variable value: Mysql decompression directory, such as D:\ Program Files\ mysql-5.7.21-winx64
(2) append PATH
;% MYSQL_HOME%\ bin
3. Configure the my.ini file
Create a new my.ini file in the extracted root directory
# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# * * DO NOT EDIT THIS FILE. It's a template which will be copied to the# * default location during install, and will be replaced if you# * upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128m # Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin # These are commonly set, remove the # and set as required. Basedir = "D:\\ Program Files\ mysql-5.7.21-winx64" datadir = "D:\ Program Files\ mysql-5.7.21-winx64\ data" port = 3306 character_set_server = utf8 # server_id =. # Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2m sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
4. Administrator mode starts the command prompt window character
Enter the mysql decompression directory to the bin directory
Such as: d:\ Program Files\ mysql-5.7.21-winx64\ bin
Execute separately:
(1) initialization: mysqld-initialize-insecure
If you report an error failed to set datadir to, execute mysqld-- initialize-- user=mysql-- console, and then execute (1)
When correct, the data folder and related files will be generated in the root directory extracted by Mysql.
(2) mysqld-install
* prompt Install/Remove of the Service Denied, indicating that the command prompt is not entered by the administrator.
(3) start the service: net start mysql
(4) Log in and change the password mysql-u root-p
[successful login directly to (5)]
Mine showed up.
Add in my.ini
Restart the service and log in successfully
(5) execute the password change statement (use set password= password ('new password') for normal login
Update user set authentication_string = password ("new password") where user='root'
(6) exit; net stop mysql
(7) successfully ignore this step when logging in.
Comment it out in my.ini.
Set password= password ('new password') after reboot entry
At this point, it can be used normally.
(8) Test show databases
5. Write two bat files to start and shut down the mysql service
(1) start the mysql service
@ echo offecho are you sure you want to start the MySQL service? Pausenet start mysqlecho has finished starting the MySQL service, please make sure there are no errors. Pause
Save as a mysql service startup .bat file, run as an administrator
(2) disable mysql service
@ echo offecho are you sure you want to shut down the MySQL service? Pausenet stop mysqlecho shutdown MySQL service completed, please make sure there is no error. Pause
Close the .bat file as a mysql service and run it as an administrator
This is the end of the MySql installation.
Wonderful topic sharing:
Installation tutorials for different versions of mysql
Installation tutorials for each version of mysql5.7
Installation tutorials for each version of mysql5.6
Installation tutorials for each version of mysql8.0
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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.