In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Let's learn about the Windows installation MySQL5.7 tutorial and forget the root password solution, I believe that after reading the Windows installation MySQL5.7 tutorial and forget the root password solution will certainly benefit a lot, the text in the essence is not much, hope this short content is what you want.
MySQL download address: https://dev.mysql.com/downloads/mysql/
Note that the version is 64-bit. Depending on the system requirements, you can choose other versions and CVM types. I use Google, which can be translated.
Here I will install to disk C, generally the MySQL is not too large, you can choose the disk.
Download it and decompress it to the disk.
You may find that there is no data directory or my-defult.ini configuration file in the extracted directory.
Go to the bin directory under the MySQL directory. Execute the following command.
It doesn't matter whether the my-default.ini file exists or not, the key is to create a new text file under the root directory and rename it to my.ini, the specific content is as follows: be sure to write the path of MySQL correctly.
[mysql]
# set mysql client default character set
Default-character-set=utf8
[mysqld]
# set port 3306
Port = 3306
# set the installation directory of mysql
Basedir=C:\ Program Files\ mysql-5.7.23-winx64
# maximum number of connections allowed
Max_connections=200
# the character set used by the server defaults to the 8-bit coded latin1 character set
Character-set-server=utf8
# default storage engine to be used when creating new tables
Default-storage-engine=INNODB
This step is to create a data folder with data on it.
At this point, open the service and open the MySQL service. It will succeed.
Get in there, MySQL.
But I don't know why the enter prompt is wrong, because there is no password set, so enter should be accessible. So let's crack it right here.
Follow my steps, step 2, you enter, there will be a stuck state, that is normal, just open a new cmd window
To enter MySQL, we need to set a password:
Test login
The following is a summary of the command, the above command is very long hand play is easy to make mistakes.
The solution of Mysql5.7 forgetting root password under mysqld-installmysqld-- initialize-- user=root-- consolemysql-u root-pWindows
1. Open the first cmd window to execute net stop mysql57
2. Execute mysqld in the first cmd window-- defaults-file= "C:\ ProgramData\ MySQL\ MySQL Server 5.7\ my.ini"-- skip-grant-tables-pay attention to the path (depending on your actual situation)
3. Open the second cmd window and execute mysql-uroot-p prompt for password, then enter directly (no need to enter password)
4. Select database: use mysql
5. Update the password of root: update user set authentication_string=password ('new password') where user='root' and Host='localhost'
6. Refresh permissions: flush privileges
7. Exit: quit
8. Log in again: mysql-uroot-p prompts for a password, and then you can log in only by entering the password. Done!
After reading the Windows installation MySQL5.7 tutorial and how to forget the root password, many readers will want to know more about it. For more industry information, you can follow our industry information section.
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.