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 > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Download address of mysql official website: https://dev.mysql.com/downloads/mysql/
Take version 5.7.21 as an example
After installing the package and decompressing it first, there is no data folder and my-default.ini mentioned in the online tutorial, as shown in the following figure
Please refer to the online tutorial for configuring environment variables, which is generally not a problem.
Mainly pay attention to the following points:
(1) it doesn't matter whether the my-default.ini file exists. You need to create a new my.ini file in the root directory. The details are as follows:
[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306 port = 3306 # set mysql installation directory basedir=D:\\ soft\\ DEV\\ mysql-5.7.21# allow maximum number of connections the character set used by the max_connections=200# server defaults to 8-bit encoded latin1 character set character-set-server=utf8# the default storage engine default-storage-engine=INNODB to use when creating a new table
You can copy and paste directly. You can mainly modify the path after basedir. Note that the path is\ instead of\.
(2) Please do not create your own data folder
Note: many tutorials on the Internet suggest creating an empty data folder and adding a sentence to the my.ini file:
# set the storage directory of the data in the mysql database
Datadir=D:\ softnew\ MYSQL\ mysql-5.7.20-winx64\ data
This will cause the service to fail to start, do not add this sentence, do not create your own data folder, just let mysql automatically generate data, specifically: open the cmd command window and go to the bin directory of the mysql installation directory. Then enter the command mysqld install to display successfully
Re-enter: mysqld-- initialize should not have any prompt at this time
Start the mysql command:
Net start mysql
Finally, the contents of the data folder should be displayed as follows:
(3) the following is the temporary password acquisition method for the new version of MySQL:
1. After installing the database and starting the service for the first time, you need to restart the service again
Net restart mysql
Under the 2.mysql\ data directory, a .err file is generated (equivalent to the log log file under linux, which will be occupied by the mysql service)
3. Open it using WordPad or word and navigate to temporary password
4. Write down the password, restart the MySQL service, and go to the CMD command line, log in here using mysql-u root-p, and type the password
5. After entering the database, use set password for root@localhost = password ('your password'); reset the login password
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.