Home  >  Article  >  Database  >  How to install MYSQL5.7.24 under Windows Server 2012

How to install MYSQL5.7.24 under Windows Server 2012

WBOY
WBOYforward
2023-05-27 08:58:061820browse

1. Prepare the .zip installation-free package of the database, download address

link: https://pan.baidu.com/s/1vI6W-F7XZ0iKuCMSBtUuhQ?pwd=r9p1

Extraction code: r9p1

2. Unzip to the location you want to install

How to install MYSQL5.7.24 under Windows Server 2012

3. Configure environment variables

Right click on this computer-> ;Properties->Advanced System Settings->Environment Variables

How to install MYSQL5.7.24 under Windows Server 2012

How to install MYSQL5.7.24 under Windows Server 2012

How to install MYSQL5.7.24 under Windows Server 2012

## is in the system variables Create a new MYSQL_HOME

How to install MYSQL5.7.24 under Windows Server 2012

The variable value here is the address after decompression of MYSQL

At the same time, find the path in the system variable, edit it, and add %MYSQL_HOME%\ bin

How to install MYSQL5.7.24 under Windows Server 2012

4. Create a new my.ini configuration file

[mysql]
default-character-set=utf8
 
[mysqld]
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
max_connect_errors=10
max_connections=50

and place it in the installation directory

How to install MYSQL5.7.24 under Windows Server 2012

5. Enter mysqld --initialize-insecure in cmd (administrator)

If no error message appears (as shown below), it proves that there is no problem with the initialization of the data directory. At this time, check the MySQL directory The data directory has been generated.

How to install MYSQL5.7.24 under Windows Server 2012

6. Enter mysqld -install to install the MYSQL service

How to install MYSQL5.7.24 under Windows Server 2012

The service is installed successfully

7. Start and shut down services

net start mysql  // 启动mysql服务
net stop mysql  // 停止mysql服务

8. Modify account password and log in

mysqladmin -u youruser password yourpassword  //修改默认账户密码
mysql -uyouruser -pyourpassword  //登录mysql

The above is the detailed content of How to install MYSQL5.7.24 under Windows Server 2012. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete