Win10 installs mysql5.7 decompressed version, for your reference, the specific contents are as follows @(Environment configuration) introduce I have always used the install version of mysql, but I always feel that there are too many things to start, so I want to try the unzip version. I encountered many problems during the installation process, and wrote down some of the pitfalls. download Of course, you can download it from the MySQL official website: Address: http://dev.mysql.com/downloads/mysql/ After downloading, it is a compressed package. Unzip it and use it directly. My unzip directory is: D:\greenware\mysql57, which is mysql_root . Install Unzip the directory: Note two things: 1. When you unzip for the first time, there is no data folder and my.ini . We can automatically initialize the data folder through the mysql tool, so don't create it yourself. 2. Create my.ini content yourself: [mysql] default-character-set=utf8 [mysqld] port = 3306 basedir = D:\greenware\mysql57 datadir = D:\greenware\mysql57\data max_connections=200 character-set-server=utf8 default-storage-engine=INNODB Then we start the installation: Open an administrator-privileged command line in mysql_root\bin Execute: mysqld --install Execute: mysqld --initialize. You need to wait for a while. If there is no error at the end, it is successful. After success, you can see that the data folder is generated under mysql_root Execute net start mysql to start the service. If it is successful, the installation is correct. Set initial password The default root password after MySQL 5.7 is not empty, so we need to set it ourselves here. First, shut down the service you just started. You can use net stop mysql or click stop in the service. Then execute in the mysql_root\bin directory: mysqld --defaults-file="D:\greenware\mysql57\my.ini" --console --skip-grant-tables . The configuration file here is the configuration file directory we just added. Then a lot of things will be output. Finally, please don't close this console Start another console and execute: mysql -u root -p . You don’t need to enter a password and can enter directly: Then set the root password. Follow the steps below to set the root password. use mysql; update user set authentication_string=password("new password") where user="root"; flush privileges; Error: You must reset your password using ALTER USER statement before executing this… Completing the above steps should be successful, but if you encounter this error the next time you come in: You must reset your password using ALTER USER statement before executing this... Solution: step 1: SET PASSWORD = PASSWORD('your new password'); step 2: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; step 3: flush privileges; end! The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed graphic explanation of setting up routing and virtual machine networking in Linux
>>: Which scenarios in JavaScript cannot use arrow functions
When vue2 converts timestamps, it generally uses ...
The default port number of the Windows server rem...
Knowledge points about Memory storage engine The ...
Mobile Mobile pages only need to be compatible wi...
This article example shares the specific code of ...
Find the problem Recently, I found a problem at w...
1. Command Introduction The chkconfig command is ...
Test the efficiency of deleting a large number of...
This article shares the specific code of React to...
History of ZFS The Z File System (ZFS) was develo...
In Nginx, there are some advanced scenarios where...
Table of contents Overview 1. Overview of input a...
Table of contents 1. Basic principles 2. Specific...
Do you add an alt attribute to the img image tag? ...
Import: Due to project requirements, we will enca...