2017 latest version of windows installation mysql tutorial

2017 latest version of windows installation mysql tutorial

1. First, download the latest version of MySQL from the official website of MySQL. Click the link to open it. Select the corresponding package to download according to your system model. It is about 300 megabytes and the version number is 5.7.19.

After downloading, decompress it, it is a standard mysql file, as shown in the figure

2. The second step is to configure the system environment variables, desktop → My Computer → right click "Properties" → Advanced System Settings → Environment Variables → System Variables → New

You can name the variable whatever you like. I'm calling it MYSQL_HOME. The variable value is the directory where the mysql folder you just downloaded is located. We point to the bin directory in it, and then confirm the return all the way.

3. There is no default configuration file in our mysql file. We create a new .ini configuration file named my-default.ini with the following content:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during installation, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = D:\mysql-server
# datadir = D:\mysql-server\data
# port = .....
# server_id = .....
#Set the server character set to utf8
character_set_server=utf8
collation-server=utf8_general_ci
#Set the installation directory of mysql basedir = D:\mysql-server
#Set the mysql data file storage directory datadir = D:\mysql-server\data
#Set the port bound to the mysql service port = 3306
#Set the maximum number of connections allowed by MySQL max_connections=15
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 
[client]  
#Set the client character set default-character-set=utf8
[WinMySQLadmin]
Server = D:\mysql-server\bin\mysqld.exe
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Pay attention to the paths in there. Be sure to change them to the path where your mysql folder is located. Since the directory I put it in is D:\mysql-server, the above configuration path is this

4. Prepare to install mysql and install it through the command line tool

First, start cmd as an administrator!!! Note!!!, you must start it as an administrator, otherwise it will report an error later, prompting that you do not have enough permissions

The command is as follows: mysqld -install If the following prompt appears, it means the installation is successful

Then start the service, command: net start mysql

At this time, an error message is reported, indicating that it cannot be started, 3534. We use the mysqld --console command to view the error log

Here it is prompted that there is no \data file or path in the mysql folder. At this time, we create a new one

We use the command to enter the path of the mysql folder and enter the following command:

  mysqld --initialize-insecure --user=mysql

After executing the above command, MySQL will create a data folder and a default database. The login username is root and the password is empty.

At this time, we restart mysql and find that it can start normally.

At this point, we have successfully installed MySQL

Summarize

The above is the 2017 latest version of Windows MySQL installation tutorial 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 installation process of MySQL 8.0 Windows zip package version
  • MySQL 8.0.11 Installation Tutorial under Windows
  • MySQL 8.0.11 Community Green Edition Installation Steps Diagram for Windows
  • MySQL5.7.17 winx64 installation version configuration method graphic tutorial under Windows server 2008 r2
  • Windows system mysql5.7.18 installation graphic tutorial
  • Detailed tutorial for installing mysql5.7.21 under Windows system
  • How to install the mysqldb module in python under windows
  • Windows Server 2016 MySQL database installation and configuration detailed installation tutorial
  • Windows Server 2008 64-bit MySQL5.6 installation-free version configuration method diagram
  • MySQL installation tutorial under Windows with pictures and text

<<:  JavaScript implements checkbox selection function

>>:  A Deep Understanding of Angle Brackets in Bash (For Beginners)

Recommend

How to mount a new disk on a Linux cloud server

background A new server was added in the company,...

Summary of basic SQL statements in MySQL database

This article uses examples to describe the basic ...

Realization of real-time file synchronization between Linux servers

Usage scenarios For existing servers A and B, if ...

Docker container data volume named mount and anonymous mount issues

Table of contents What is a container data volume...

Detailed process of using Vscode combined with docker for development

Preface Using Docker and VS Code can optimize the...

How to configure Basic Auth login authentication in Nginx

Sometimes we build a file server through nginx, w...

Example to explain the size of MySQL statistics table

Counting the size of each table in each database ...

Use js to call js functions in iframe pages

Recently, I have been working on thesis proposals ...

MySQL sql_mode analysis and setting explanation

When inserting a set of data into the MySQL datab...

Docker Stack deployment method steps for web cluster

Docker is becoming more and more mature and its f...

Steps to modify the MySQL database data file path under Linux

After installing the MySQL database using the rpm...

Summary of the use of html meta tags (recommended)

Meta tag function The META tag is a key tag in th...