In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MySQL installation is divided into installation version and decompression version, the installation version is mainly installed by an exe program, with an interface mouse click to install, Xiaobai suggests using the installation version to install mysql, compared with the installation version, the unzipped version installation is more "pure", there is no extra stuff, but it is more complex, and there are many potholes (all tears). This tutorial is located in the correct posture to install the latest version of MySQL 8.0.11 (funny).
1. Go to the MySQL official website to download the compressed package
Web site: https://dev.mysql.com/downloads/mysql/
Here we choose MySQL Community Server.
Click Download
Next, click to skip it directly and download it without logging in.
two。 Extract the installation package
3. Add the configuration file my.ini in the decompressed directory
The my.ini file is as follows:
[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set 3306 port port=3306# set mysql installation directory basedir=D:\ program\ mysql# set mysql database data storage directory datadir=D:\ program\ mysql\ data# allow maximum number of connections character set used by max_connections=200# server defaults to 8-bit latin1 character set character-set-server=utf8# default memory to be used when creating a new table Storage engine explicit_defaults_for_timestamp=truedefault-storage-engine=INNODB
There is a pothole. There can be no spaces on the left and right sides of the equal sign of the configuration field, otherwise the following error may be reported when MySQL is initialized:
4. Install MySQL
Run cmd as an administrator, and be sure to run it as an administrator
Go to the bin directory of the mysql package:
D:cd D:\ program\ mysql\ bin
4.1 execute the start installation command
Mysqld install
Prompt Service successfully installed indicates that mysqld started successfully
4.2 initialize the MySQL database
Mysqld-initialize-user=mysql-console
If the-- console parameter is not added, the execution result will not be displayed on the console, and the initial MySQL password is not known, so it is best to add it for subsequent convenience (the initial installation is masked, woo). As shown in the figure above, the initial password of the database can be seen. Note: the space character in front of it is also part of the password, Anyway, if you really forget to add it (I'm afraid it's less silly like me). There is still a way to find the initial password. You will find a newly generated data directory. You can go to the server-key.pem file in the data directory to find it (hehe).
4.3 start the MySQL service
Net start mysql
4.4 Log in to MySQL
Mysql-uroot-p
Enter the initial password you just got after entering enter.
4.5 change the password:
After entering, execute show databases; and you will find the following figure:
It turns out that you need to change the password after logging in to MySQL, otherwise you cannot operate the MySQL database (of course, there is a way to force it to use the initial password, so I won't repeat it here.)
Change the password MySQL:
ALTER USER 'root'@'localhost' IDENTIFIED BY' root123'
Note: the 'root'' in the above command is the login MySQL user name, and the login MySQL password for 'root123'' can be set according to your own.
4.6 Log in to MySQL
Mysql-uroot-proot123
Then execute the command to view the database just now.
Happy Ending!
Summary
The above is the detailed description of the installation and decompression version of MySQL tutorial under Windows10 introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me, and the editor will reply to 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.