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 > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the mysql installation forget the initial password how to do, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
An initial password is given when you install MySQL, and this initial password is particularly disgusting with a bunch of uppercase and lowercase special characters. Keep in mind that it is impossible, nine times out of ten, a partner who has no previous installation experience will not pay attention to this if he or she installs independently for the first time.
The version of MySQL used in this tutorial is version 8.0.19. Version 8 should be able to use this method, other versions are not clear, you can try. If you are proficient in the whole process, it will be done in two minutes.
First of all, take the tutorial.
Just do it. The previous findings are all nonsense.
1. First, make sure that the folder (data) of datadir in the my.ini file is not created manually
[client] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306port=3306# set mysql installation directory basedir=F:\\ MYSQL\\ mysql-8.0.19-winx64\\ mysql-8.0.19-winx64# set the location of the mysql database 8 there is no need to set datadir=F:\\ MYSQL\\ mysql-8.0.19-winx64\\ mysql-8.0.19-winx64\\ data# allows maximum number of connections the character set used by the max_connections=20# server defaults to the 8-bit encoded latinl character set character-set-server=utf8# the default storage engine default-storage-engine=INNODB used when creating new tables
two。 Delete this data folder
3. Open cmd in administrator mode, go to the installation directory of MySQL, and enter:
Sc delete mysql
4. Reinitialize the database (write down the password generated in this step, or forget it)
Mysqld-initialize-console
5. Reinstall MySQL
Mysqld install
In this way, try again to see if it can be started.
It's over? There is no next step to tell you how to change the password, this online pile of code.
6. Add this line under mysqld in the my.ini file (skip password verification when logging in? Alas, so which of my above steps are not all. Wasted):
Skip-grant-tables
7. After saving and exiting, retype
Mysql-uroot-p
8. At this time, I have already entered the mysql database. The next few steps are also set up successfully by learning the methods of others. You can use them by yourself, and type:
Flush privileges;alter user 'root'@'localhost'IDENTIFIED BY' the new password you want to set'
So that the new password can take effect.
But remember to remove the line of code (skip-grant-tables) that was added to the ini file.
The problem of forgetting the initial password can be completely solved by following the 8 steps above. Thank you for your study.
Thank you for reading this article carefully. I hope the article "how to forget the initial password for mysql installation" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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: 230
*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.