In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How do I install mysql 8.0.12 and change my password? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
1. Download MySQL from the official website
2. Install "D:mysql" on this machine: after decompressing the zip file, copy all the files in the extracted folder to the mysql folder of the D disk.
3. Create a mysql.ini file and put it under the D:mysql file. The file content is as follows:
[mysqld] # set port 3306 port=3306# set mysql installation directory basedir=D:\\ mySQL\\ mysql # set the data storage directory of the mysql database datadir=D:\\ mySQL\\ mysql\\ Data # allow maximum number of connections max_connections=200# allowed number of connections the character set used by the max_connect_errors=10# server defaults to the default storage engine that UTF8character-set-server=utf8# will use when creating a new table By default, default-storage-engine=INNODB# uses the "mysql_native_password" plug-in to authenticate default_authentication_plugin=mysql_native_ password [MySQL] # set the mysql client default character set default-character-set=utf8 [client] # set the default port port=3306default-character-set=utf8 when the mysql client connects to the server
4. Open the cmd command line tool as an administrator and change the directory to: d:\ mysql\ bin
1) enter the following installation command mysqld install
2) after the installation is successful, initialize the data directory with the mysqld-- initialize-insecure command
3) then start it again: net start mysql
4) after starting successfully, you need to log in to mysql:mysql-u root-p
At this point, enter directly without entering the password.
5) after entering successfully, the mysql > flag appears, and then enter "ALTER USER USER () IDENTIFIED BY 'new password;" to change the password.
6) if you cannot enter the mysql database directly in step 4, then:
Open the mysql.ini file in the mysql directory, add a line "skip-grant-tables" at the end of the file, save and close the file.
Restart the MySQL service.
Enter the bin directory of mysql through the command line, enter "mysql-u root-p" (no password), and enter to enter the database.
After changing the password, open the mysql.ini file in the mysql directory, delete the "skip-grant-tables" on the last line, save and close the file.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.