The offline installation method of MySQL_8.0.2 is for your reference. The specific contents are as follows The following compressed package was obtained from the MySQL official website: After decompression, it becomes like this: The file looks like this: Here it begins, please pay attention. The first step: configure the my.ini file The content is as follows: [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [mysqld] #Set port 3306 port = 3306 # Set the installation directory of mysql. If an error occurs, use a backslash basedir=D:\\tools\\mysql-8.0.2-dmr-winx64 # Set the storage directory of mysql database data datadir=D:\\tools\\mysql-8.0.2-dmr-winx64\\data skip-grant-tables # Maximum number of connections allowed max_connections=200 # The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB Copy the above content into Notepad, rename it to my.ini, and move it to the MySQL installation directory. Note two points 1. Everyone's installation directory is different, so the installation directory and data storage directory can be changed accordingly. 2. In basedir=D:\\tools\\mysql-8.0.2-dmr-winx64, do not write '\\' as '\'. The second step: configure MySQL environment variables 1.Win+R, enter sysdm.cpl, as shown in the figure: 2. After pressing Enter, it appears, as shown in the figure: 3. Click Advanced->Environment Variables (N)...as shown in the figure: 4. Continue as shown: 5. Continue as shown: 6. Continue as shown: 7. Still continue as shown: Finally, confirm the application. The second step: create a data folder Enter the command line as an administrator and go to the bin folder under mysql-8.0.2-dmr-winx64 , as shown in the figure: Then enter: mysqld –initialize –insecure and wait for about 40 seconds. Then the data directory will appear in the mysql-8.0.2-dmr-winx64 folder: Then enter mysqld –install and press Enter. Then, start the database service: net start mysql , and the following figure will appear: Step 3: Set a password After entering the mysql environment, enter: update mysql.user set authentication_string = password('The password you are going to set') where user = 'Username'; For example: update mysql.user set authentication_string = password('147258369') where user = 'root'; Then, enter flush privileges; to make it take effect immediately. Then enter quit to exit the MySQL environment and restart it. Step 4: Log in to the database Log in to the database with administrator privileges and enter mysql –u username –p For example: mysql –u root –p Enter the password you set previously and press Enter. Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for MySQL 5.7 versions Installation tutorials for MySQL 5.6 versions 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 explanation of JavaScript primitive data type Symbol
>>: How to allow remote access to open ports in Linux
Docker view process, memory, cup consumption Star...
Table of contents Preface React Functional Compon...
Table of contents 1.MySQL adds or subtracts a tim...
Use stored procedures to start transactions when ...
The display effects on IE, Fir...
Table of contents Introduction Uses of closures C...
This article example shares the specific code of ...
Table of contents 1. Introduction 2. Customize ta...
Table of contents Block-level functions Directly ...
The same server simulates the master-slave synchr...
This article shares the specific code of Vue to a...
This article example shares the specific code of ...
Table of contents background Solution New Questio...
There are two common ways to download files in da...
The :not pseudo-class selector can filter element...