In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Http://www.cppcns.com/shujuku/mysql/283231.html can also refer to this 8.0.18 installation method.
1. Download the zip installation package (extract it to the specified folder)
1) download the installation package from the mysql official website
2) Click to enter, and click in the order marked below to enter the download page
3) download the compressed package marked in the red box (note that it is 64-bit here, click go to Download Page to switch if you want to download 32-bit)
4) unzip it to the specified folder (move this folder to the place where you want to install mysql, that is, the directory where you installed mysql, for example, mine is under G:\ anzhuangbao\ MYSQL)
two。 Configure the environment
Open my computer-> Properties-> Advanced-> Environment variable, select PATH in the system variable, and add: the path to your mysql bin folder (such as:
G:\ anzhuangbao\ MYSQL\ mysql-8.0.15-winx64\ bin), note that it is appended, not overwritten, and then make sure
3. Configuration file (some changes that must be made before installation)
After decompressing the folder, there are no my.ini and data files, as shown below.
Create your own text document and rename it to my.ini (open it in notepad)
Enter the following in:
[mysqld] # set port 3306 port=3306# to set the installation directory of mysql. It is best to use'/'to indicate the path basedir=C:\ mysql\ mysql-8.0.18-winx64# to set the data storage directory of the mysql database. It is best to use'/'to indicate the path datadir=C:\ mysql\ mysql-8.0.18-winx64/data# maximum number of connections max_connections=200# allows the number of times the connection fails. 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. By default, the default storage engine default-storage-engine=INNODB# that will be used when UTF8character-set-server=utf8mb4# creates a new table uses the "mysql_native_password" plug-in authentication default_authentication_plugin=mysql_native_password# to modify modesql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO. NO_ENGINE_SUBSTITUTION' [mysql] # set mysql client default character set default-character-set=utf8mb4 [client] # set the default port port=3306default-character-set=utf8mb4 for mysql clients to connect to the server
Note: basedir= the path where your extracted files are located
4. Open cmd as an administrator (not Baidu, a lot) and enter the command
Cd C:\ mysql\ mysql-8.0.18-winx64\ bin
And initialize it.
Mysqld-initialize-console
Be careful! [note] [MY-010454] [server] generate a temporary password for root @ localhost: 9P0gYkmuri? 0meme KT in which root @ localhost: the latter 9P0gYkmuri? 07kT is the initial password (without the first space). You need to remember this password before you change it, and you need to use it for subsequent logins. Copy the password and save it first!
5. Then enter mysqld-- initialize-insecure-- user=mysql to enter
6. Then enter mysqld install and enter enter.
Mine has been pressed, so it will show that it already exists.
7. Enter net start mysql enter to start the mysql service
8. Then enter mysql-u root-p to log in to the mysql database
Enter will prompt you for your password, and just enter directly. As shown in the figure below, you have successfully logged in.
9. Then enter show databases; enter, pay attention to this English semicolon, absolutely can not lose!
You can see that the database has been displayed!
10. At this point, the compressed package version of mysql has been successfully installed ~ perfect
If you forget your password, it doesn't matter, don't panic about the operation.
1. Run cmd as an administrator and enter the bin directory where mysql is installed (C:\ mysql\ mysql-8.0.18-winx64\ bin)
2. Execute the command, net stop mysql (stop mysql service)
3. Execute the command, mysqld-- console-- skip-grant-tables-- shared-memory (enter password-free mode)
4. Reopen a cmd and enter the bin directory of mysql under the same administrator account (C:\ mysql\ mysql-8.0.18-winx64\ bin).
5. Execute the command, mysql-u root-p, log in directly without entering a password, and you will log in to mysql successfully.
6. Execute the command flush privileges; (refresh the permission table, this step must be done, but I did not do this step, and repeated many modifications without success)
7. Execute the command ALTER USER 'root'@'localhost' IDENTIFIED BY' New password
8. Execute the command flush privileges; (must operate)
9. Quit mysql, control + Z. If exit doesn't work.
10. Re-administrator commands to run cmd, enter the bin directory of mysql, execute the command, net start mysql (start the mysql service)
11. Execute the command mysql-u root-p, enter the new password, and log in to mysql successfully
I took care of it. I hope I can help you.
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.