Detailed installation tutorial of mysql 5.7.11 under Win7 system

Detailed installation tutorial of mysql 5.7.11 under Win7 system

Operating system: Win7 64-bit Ultimate Edition

MySQL compressed package: mysql-5.7.11-winx64.zip

1. Unzip the MySQL compressed package

Unzip the downloaded MySQL compressed package to a custom directory. My unzip directory is:

"D:\Program Files\mysql-5.7.11-winx64"

Copy the default file my-default.ini in the decompressed directory and rename it to my.ini

Copy the following configuration information to my.ini and save it

#If there is no my-default.ini, you can create a new my.ini yourself or get it from other places###############################################################
[client]
port=3306
default-character-set=utf8
[mysqld]
port=3306
character_set_server=utf8
#Unzip directory basedir=D:\Program Files\mysql-5.7.11-winx64
#Unzip the data directory datadir=D:\Program Files\mysql-5.7.11-winx64\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[WinMySQLAdmin]
D:\Program Files\mysql-5.7.11-winx64\bin\mysqld.exe

2. Add environment variables

The operation is as follows:

1) Right click My Computer -> Properties -> Advanced system settings (Advanced) -> Environment Variables

Click the New button under System Variables

Enter the variable name: MYSQL_HOME

Enter variable value: D:\Program Files\mysql-5.7.11-winx64

# is the custom decompression directory of mysql.

2) Select Path in the system variables

Click the Edit button

Add the variable value in the variable value: ;%MYSQL_HOME%\bin

Note that this variable is added after the original variable value, separated by ;. The original variable value cannot be deleted.

3.

1) From the console, go to the bin directory under the MySQL decompression directory:

2) Enter the service installation command:

1. mysqld --console

2. mysqld --initialize

3. mysqld install

After the installation is successful, a message will pop up saying that the service has been successfully installed.

#Note: #These steps are performed because there is no data folder in MySQL5.7.9. You need to use these commands to create a data folder

#Remove service command: mysqld remove

4. Start MySQL service

Method 1:

The command to start the service is: net start mysql

Method 2:

Open the management tool service and find the MySQL service.

Start the service by right-clicking and selecting Start or directly clicking Start on the left.

5. Change the root account password

1. Modify the MySQL configuration file (my.ini) and add a line of skip-grant-tables under [mysqld]

2. After mysql is restarted, you can directly enter it using mysql -u root -p (the password is empty at this time)

3. mysql> update mysql.user set authentication_string=password('123qaz') where user='root' and Host = 'localhost';

4. mysql> flush privileges;

5.mysql> quit;

6. Restore the /etc/my.cnf file (delete the skip-grant-tables line) and restart mysql

7. Now you can use mysql -u root -p '123qaz' to enter

8. mysql>SET PASSWORD = PASSWORD('123456'); Set a new password

Summarize

The above is a detailed installation tutorial of MySQL 5.7.11 under Win7 system 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:
  • Detailed explanation of the order of Mysql query results according to the order of ID in in()
  • PHP installation extension mysqli implementation steps and error solutions
  • Detailed example of php mysql PDO query operation
  • Example of how to use PHP to operate BLOB fields in MySQL [Storing text and pictures]
  • How to delete table data in MySQL

<<:  Complete steps to install FFmpeg in CentOS server

>>:  How to create WeChat games with CocosCreator

Recommend

Detailed explanation of MySQL database Event scheduled execution tasks

1. Background As the project's business conti...

Introduction to /etc/my.cnf parameters in MySQL 5.7

Below are some common parameters of /etc/my.cnf o...

Example of how to build a Mysql cluster with docker

Docker basic instructions: Update Packages yum -y...

Tips for designing photo preview navigation on web pages

<br />Navigation does not just refer to the ...

A brief discussion of four commonly used storage engines in MySQL

Introduction to four commonly used MySQL engines ...

centos7.2 offline installation mysql5.7.18.tar.gz

Because of network isolation, MySQL cannot be ins...

8 JS reduce usage examples and reduce operation methods

reduce method is an array iteration method. Unlik...

Node quickly builds the backend implementation steps

1. First install node, express, express-generator...

Getting Started Tutorial on GDB in Linux

Preface gdb is a very useful debugging tool under...

MySQL uses SQL statements to modify table names

In MySQL, you can use the SQL statement rename ta...

MySQL column to row conversion tips (share)

Preface: Because many business tables use design ...

CSS beginner tutorial: background image fills the entire screen

If you want the entire interface to have a backgr...