This article shares the installation tutorial of MySQL 5.7.21 for your reference. The specific contents are as follows Installation Environment Windows version: Windows 7 Professional 64bit Before installing MySQL, please make sure that the net command on your computer is working properly. Some Windows systems may be missing the net command (environment variable missing). Installation Process 1. Download MySQL Community Server 2. Unzip and "reasonably place" MySQL Server 3. Configure environment variables for MySQL Server ---In the "User variables" section, select "New". In the dialog box that opens, write MySQL as the variable name and the full path of the MySQL folder (D:\MYSQL\mysql-5.7.21-winx64) as the variable value. ---Look for the PATH environment variable in the User section, if it is there, click "Edit". Use a semicolon at the end of the variable value; to separate it, then add %MySQL%\bin; 4. Register MySQL service -----cd to the bin folder of the folder where MySQL Server is located----------------mysqld -install command, register MySQL service 5. Create the my.ini file in the MySQL directory (D:\MYSQL\mysql-5.7.21-winx64) with the following content: [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 to basedir=F:\mysql-5.7.21-winx64 # Set the storage directory of mysql database data datadir=F:\mysql-5.7.21-winx64\data # 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 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 6. Generate data directory: ----In the "Command Prompt" just now, execute mysqld --initialize 7. Start MySQL Server ----Execute net start mysql in the "Command Prompt" to start MySQL Server 8. Configure the MySQL root account. In the Command Prompt, execute net stop mysql to shut down the MySQL Server. Then execute mysqld --skip-grant-tables to start the password-less MySQL Server. Open a new Command Prompt and execute mysql -u root to log in to the MySQL Server. Run the flush privileges command to refresh permissions. Execute grant all privileges on *.* to 'root'@'localhost' identified by 'the password you want to set' with grant option;. Run the flush privileges command to refresh the new root user password. Execute exit to exit MySQL. Run net start mysql in the Command Prompt to restart MySQL Server, and then use mysql -u root -p again with the password you set to log in to MySQL securely. 9. Possible problems: After installing mysql, I changed the ROOT password and used net start mysql ------ and it said that it could not be started Solution: Execute mysqladmin -u root -p shutdown and enter the set password to start successfully The above command line must be opened with administrator privileges . Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for various versions of MySQL 5.7 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 steps for installing Harbor, a private Docker repository
>>: How to use JS to parse the excel content in the clipboard
This article shares the installation and activati...
Let's start with the body: When viewing a web ...
Table of contents Create a new html file: Create ...
The emergence of jQuery has greatly improved our ...
Table of contents Overview Single file components...
What is JSX JSX is a syntax extension of Javascri...
Table of contents Problem Analysis Why encapsulat...
Flex layout is a commonly used layout method nowa...
Table of contents transition hook function Custom...
Why should we read the log? For example, if the c...
Table of contents 1. Create a redis docker base i...
MySQL Limit can query database data in segments a...
Table of contents 1. Variable Overview 1.1 Storag...
When there are tens of thousands of records in th...
Table of contents 1 Test Cases 2 JS array dedupli...