In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 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 of mysql 8.0.11 for your reference. The details are as follows.
1. MySQL installation
1.1 download the Windows version of the MySQL installation package on the MySQL official website
Download address
Click to download Download and the following interface will pop up. Click No thanks, just start my download
1.2 after downloading, extract the zip package to the directory you want to install. I will put the unzipped folder under D:\ MySQL.
1.3 configure environment variables:
Enter computer-Advanced system Settings-Advanced-Environment variables
Add the path of mysql decompression
1.4 next configure the configuration file for MySQL
Open the folder D:\ MySQL\ mysql-8.0.11-winx64 that you just extracted, create a configuration file as my.ini, and edit the following basic information about my.ini configuration:
[mysql] default-character-set= UTF8 [mysqld] port = 3306basedir=D:\ MySQL\ mysql-8.0.11-winx64datadir=D:\ MySQL\ mysql-8.0.11-winx64\ datacharacter-set-server=utf8default-storage-engine=INNODB
Next, let's start the MySQL database:
Open the cmd command line tool as an administrator and change directories:
D:
Cd D:\ MySQL\ mysql-8.0.11-winx64\ bin
Enter the initialization command:
Mysqld-initialize-insecure-user=mysql
Generate the data directory under the D:\ MySQL\ mysql-8.0.11-winx64\ bin directory
Start and enter the following command:
Net start mysql
This proves that the connection has been successful.
If an unable to start error occurs, it is as follows:
The reason may be that you have opened another database and the port is occupied.
First open the Control Panel-system Security-Management tools
Pop up the management tools interface and click Service
The service page pops up, as shown in the figure
You can see that MySQL80 is started, but mysql is not started. MySQL80 is a network service MySQL database installed through the MySQL installer client, and both local and network are enabled at the same time.
When you want to use the locally created mysql, you should first close MySQL80, the network service database. There are two ways to close it.
1) right-click MySQL80 and click stop
2) enter the following command on the command side:
Net stop MySQL80
Then enter
Net start mysql
It can start normally.
2. MySQL reset password
2.1 Log in to mysql
Enter:
Mysql-u root-p
Because the password has not been set before, the password is empty, so you can enter directly:
2.2 query user password:
Query user password command:
Mysql > select host,user,authentication_string from mysql.user
Host: ip that allows users to log in
User: the user name of the current database
Authentication_string: user password
If it is empty, the root line should be empty.
2.3 set (or modify) the root user password:
Note: the password field and the password () function have been discarded after mysql 5.7.9
The password must not be taken in the following form:
Use mysql; update user set authentication_string= "newpassword" where user= "root"
This sets the newpassword value under the authentication_string field of the root user in the user table
The steps to correctly change the root password are:
1) if there is content under the authentication_string field of the current root user, set it to empty first, and skip to step 2 if not.
Use mysql; update user set authentication_string='' where user='root'
2) use ALTER to modify the root user password by
Use mysql;ALTER user 'root'@'localhost' IDENTIFIED BY' New password; FLUSH PRIVILEGES
At this point, the local MySQL created by yourself has been created!
Just reconnect!
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
Too lazy to type, QQ screenshot record, ha
© 2024 shulou.com SLNews company. All rights reserved.