Home > Database > Mysql Tutorial > body text

How to install MYSQL5.7.24 under Windows Server 2012

WBOY
Release: 2023-05-27 08:58:06
forward
1822 people have browsed it

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
Copy after login

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服务
Copy after login

8. Modify account password and log in

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

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template