In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to install MySQL 8.x in the Windows environment, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Download MySQL
Go to the download address of the MySQL official website and select Windows (x86, 64-bit), ZIP Archive.
You don't have to log in, just skip it. The download process may be slow. Wait patiently.
After the download is complete, extract it directly to your favorite location.
Uninstall the original version
If you have previously installed an earlier version of MySQL, you need to uninstall the previous MySQL first. If it is not installed, you can skip this step directly.
The administrator opens cmd, first net stop mysql stops the mysql service, and then uses mysqld remove MySQL to remove MySQL.
Net stop mysql mysqld remove MySQL
Delete the registry information in case you sometimes fail to install the new version. Delete the following, but I only have the first one in the operation.
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Application/MySQLHKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Application/MySQLHKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Application/MySQL
Modify the environment variable of the old MySQL_HOME to point to the new version location.
Install MySQL
In the MySQL unzipped directory, create a new data folder and create a my.ini configuration file.
[mysqld] # set port 3306 port=3306# set the installation directory of mysql:\\ tools\\ MySQL\\ mysql-8.0.18-winx64# set the directory where the data of the mysql database is stored datadir=E:\\ tools\\ MySQL\\ mysql-8.0.18-winx64\\ data# the maximum number of connections max_connections=3000# allows the number of connections to fail. This is to prevent anyone from attempting to attack the character set used by the max_connect_errors=10# server of the database system from this host. The default storage engine default-storage-engine=INNODB [mysql] # to be used by UTF8character-set-server=utf8# to create a new table sets the default character set of the mysql client, default-character-set=utf8 [client] # sets the port port=3306# used by the mysql client to connect to the server, and sets the mysql client. The default character set default-character-set=utf8 when connecting to the server
Enter the bin directory and execute mysqld-- initialize-- console. A temporary password will be output after successful execution.
Mysqld-- initialize-- after successful execution, console will output: A temporary password is generated for root@localhost: a4lcly4e8f-Ga4lcly4e8f-G is the temporary password.
Then use this password to proceed, and if you are lucky, you can enter MySQL normally.
Login error report
If unfortunately, it is wrong to log in to the Times with a temporary password, ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
If you encounter this problem, you need to skip password verification.
Stop the MySQL service first: net stop mysql
In the bin directory of the MySQL installation path, type mysqld-- console-- skip-grant-tables-- shared-memory, and the cmd window will be suspended, that is, it looks stuck. Don't worry, this is normal.
Then open another window, which is also the bin directory of the MySQL installation path, type mysql directly, and execute use mysql.
Use flush privileges to refresh permissions, and then alter user'root'@'localhost' IDENTIFIED BY '1234 permissions; change the password.
To be on the safe side, use flush privileges to refresh permissions again.
Close the window, reconnect to MySQL:mysql-u root-p with the password you just gave, and then enter the password. If the service is not started, start the MySQL service first and enter net start mysql.
# turn off MySQLnet stop mysql# skip permission check mysqld-- console-- skip-grant-tables-- shared-memory# refresh permission flush privileges#-- connect to MySQLmysql# in skip-grant-tables mode and use the system mysql library use mysql# to change the password alter user 'root'@'localhost' IDENTIFIED BY' 1234' # Refresh permission flush privileges# can omit the space after connecting to MySQL,-u and-p, but do not enter the password after-p, and then enter the password after pressing enter, so it is more secure to mysql-u root-p 123 quit MySQL\ qexitquit is how to install MySQL 8.x in the Windows environment. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.