MySQL 5.7.18 installation tutorial under Windows

MySQL 5.7.18 installation tutorial under Windows

This article explains how to install MySQL from a compressed package.

1. Download the MySQL compressed package, [Windows (x86, 64-bit), ZIP Archive];

2. Unzip the Zip package to the required directory, for example, D:\mysql-5.7.18-winx64;

3. Create the my.ini file with the following content:

[mysqld] 
port=3306 
basedir=D:\\mysql-5.7.18-winx64\\
datadir=F:\\mysqlData\\
character-set-server=utf8

Note that basedir and datadir must be configured, basedir is the directory where you unzipped the files. The official documentation says that if you like to use slashes, you should use double slashes, but not backslashes. That is: D:\\mysql-5.7.13-winx64\\ or: D:/mysql-5.7.13-winx64/
Since I like to separate the database data files, I configure the datadir to other places for easy management.

4. Configure environment variables

Add a variable called MYSQL_HOME.
Modify the Path variable and add %MYSQL_HOME%\bin at the end

5. Initialize and start the Mysql service

Run cmd with administrator privileges, initialize MySQL, and execute

mysqld --initialize-insecure

Register the MySQL service, start MySQL, and execute

mysqld -install
net start mysql

6. Log in to MySQL and set the root password

mysql -uroot -p

When you log in for the first time, press Enter to log in without a password. After logging in to MySQL, set the root password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

After changing the password, we can log in successfully using root.

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:
  • MySQL 5.7.18 installation and configuration tutorial under Windows
  • mysql5.7.18.zip Installation-free version configuration tutorial (windows)
  • Tutorial on installing mysql5.7.18 on windows10
  • MySQL 5.7.18 winx64 installation and configuration method graphic tutorial
  • MySQL 5.7.18 installation tutorial and problem summary
  • How to change password in MySQL 5.7.18
  • Linux CentOS MySQL 5.7.18 5.7.X Installation Tutorial
  • Detailed tutorial on installing MySQL 5.7.18 under CentOS 6.5
  • MySQL 5.7.18 free installation version configuration tutorial
  • MySQL 5.7.18 installation and configuration method graphic tutorial (CentOS7)

<<:  Linux Dig command usage

>>:  Tutorial on installing MySQL on Alibaba Cloud Centos 7.5

Recommend

Example code for mixing float and margin in CSS

In my recent studies, I found some layout exercis...

Detailed examples of ajax usage in js and jQuery

Table of contents Native JS How to send a get req...

Detailed examples of converting rows to columns and columns to rows in MySQL

mysql row to column, column to row The sentence i...

Detailed explanation of Vue form binding and components

Table of contents 1. What is two-way data binding...

mysql5.7.21.zip installation tutorial

The detailed installation process of mysql5.7.21 ...

A Brief Analysis of the Differences between “:=” and “=” in MySQL

= Only when setting and updating does it have the...

Detailed explanation of the role of the new operator in Js

Preface Js is the most commonly used code manipul...

How to use Docker to build a tomcat cluster using nginx (with pictures and text)

First, create a tomcat folder. To facilitate the ...

HTML table tag tutorial (11): horizontal alignment attribute ALIGN

In the horizontal direction, you can set the alig...

SQL GROUP BY detailed explanation and simple example

The GROUP BY statement is used in conjunction wit...

17 JavaScript One-Liners

Table of contents 1. DOM & BOM related 1. Che...

jQuery combined with CSS to achieve the return to top function

CSS Operations CSS $("").css(name|pro|[...