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

Some problems that may be caused by inconsistent MySQL encoding

Stored procedures and coding In MySQL stored proc...

Example of using CSS3 to achieve shiny font effect when unlocking an Apple phone

0. Introduction August 18, 2016 Today, I noticed ...

Will mysql's in invalidate the index?

Will mysql's IN invalidate the index? Won'...

Solve the problem of the container showing Exited (0) after docker run

I made a Dockerfile for openresty on centos7 and ...

How to create a Django project + connect to MySQL

1: django-admin.py startproject project name 2: c...

React new version life cycle hook function and usage detailed explanation

Compared with the old life cycle Three hooks are ...

React introduces antd-mobile+postcss to build mobile terminal

Install antd-mobile Global import npm install ant...

How to install pyenv under Linux

Prerequisites Need to install git Installation St...

Detailed explanation of Vue custom instructions and their use

Table of contents 1. What is a directive? Some co...

Getting Started with CSS3 Animation in 10 Minutes

Introduction Animation allows you to easily imple...

Javascript tree menu (11 items)

1. dhtmlxTree dHTMLxTree is a feature-rich Tree M...

Docker installation and configuration steps for RabbitMQ

Table of contents Single-machine deployment Onlin...

A brief discussion on the design of Tomcat multi-layer container

Table of contents Container Hierarchy The process...