Step 1: Configure environment variables (my decompression path: G:\mysql\mysql-5.7.21-winx64) MYSQL_HOME = the path where you unzipped the file PATH = ;%MYSQL_HOME%\bin; The PATH variable is added on the basis of the original one, do not delete the other settings The second step is to add the my.ini file in the unzipped directory (if this file already exists, just replace the content inside) The file content is [client] port=3306 default-character-set=utf8 [mysqld] port=3306 character_set_server=utf8 #Unzip directory basedir=G:\mysql\mysql-5.7.21-winx64 #Unzip the data directory datadir=G:\mysql\mysql-5.7.21-winx64\data sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [WinMySQLAdmin] G:\mysql\mysql-5.7.21-winx64\bin\mysqld.exe Step 3: Run cmd as an administrator (search Baidu if you don’t understand), then enter the bin folder in the decompressed path, execute the mysqld -install command, and then create a data folder in the decompressed path (without content) Step 4: Log in Open cmd as an administrator, then enter mysql -uroot -p and press Enter without a password (the default password is empty) Step 5: Change password First, use Then start the MySQL service and modify the authentication_string field value of the root user in the user table in the MySQL data source (originally the password field, later changed to authentication_string) After success, delete the skip-grant-tables in the my.ini file and you're done. If an error occurs:
It is because the password has expired. You can set it like this set password = password('mysql'); use mysql update user set password_lifetime = 0 where User='root'; flush privileges; Summarize The above is the tutorial on configuring and changing the password of the MySQL free installation version introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Example of how to configure nginx in centos server
>>: React Synthetic Events Explained
This article records the installation and configu...
Download the rpm installation package MySQL offic...
In actual projects, there are relationships betwe...
Table of contents 1. Node builds HTTP server 2. H...
Many times, we ignore the setting of the web page ...
Website compatibility debugging is really annoyin...
Win10 system locally installed MySQL8.0.20, perso...
1. Use CSS Copy code The code is as follows: style...
Table of contents Event-driven and publish-subscr...
This article shares the specific code of JavaScri...
1. Install zabbix-agent on web01 Deploy zabbix wa...
Table of contents Installation Environment Descri...
1. Background In the context of rapid updates and...
Method 1: Use the SET PASSWORD command First log ...
Copy code The code is as follows: <html> &l...