MySQL 5.7.11 zip installation and configuration method graphic tutorial

MySQL 5.7.11 zip installation and configuration method graphic tutorial

1. Download the MySQL 5.7.11 zip installation package

This machine takes win7 64-bit system as an example. If it is a 32-bit system, please download the 32-bit installation package

http://dev.mysql.com/downloads/mysql/

Select Windows (x86, 64-bit), ZIP Archive Download Package

2. Extracting the Install Archive

D:\victor.min\software\mysql-5.7.11-winx64 #My decompression directory

3. Create an empty folder and name it data, or you can name it anything you want to store data

# This machine is created in the D:\victor.min\software\mysql-5.7.11-winx64 directory, so you will see D:\victor.min\software\mysql-5.7.11-winx64\data at the end #This folder will be used later

4. Configure your own startup configuration file | Creating an Option File

If you don't have any special requirements, just copy the D:\victor.min\software\mysql-5.7.11-winx64\my-default.ini file, rename it to my.ini, and modify a few parameters in it. The configuration file is as follows

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/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 = .....
# datadir = .....
# port = .....
# server_id = .....

#########################
# basedir is the directory after the installation file is unzipped | basedir and datadir can use relative paths # basedir=./..
basedir=D:\\victor.min\\software\\mysql-5.7.11-winx64
# datadir is the directory used to store data# datadir=./../data
datadir=D:\\victor.min\\software\\mysql-5.7.11-winx64\\data
# port is the port number port=3306
# mar_connections is the maximum number of connections max_connections=20
character_set_server=utf8
 

# 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 

explicit_defaults_for_timestamp=true
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

5. Initializing the Data Directory

Of course, according to the steps given in the official MySQL documentation, there is another step, Selecting a MySQL Server Type, which is to choose whether to use mysqld or mysqld-debug | The command is as follows

mysqld --defaults-file="D:\victor.min\software\mysql-5.7.11-winx64\my.ini" --initialize-insecure

Note:

1. This command is very important. It will initialize the data directory. Please delete all files in the data directory before executing this command, otherwise it will fail.

2. You can choose to initialize with --initialize-insecure or --initialize. --initialize-insecure initializes the root password to empty. If you use --initialize to initialize, a random password will be generated.

After successful execution, you will see mysql, performance_schema, and sys directories in the data directory, as well as some files

6. Install MySQL service

mysqld -install

7. Start mysql service

net start mysql

At this point, the mysql service is started, and we can log in to mysql as root

mysql -u root -p

For convenience, it is best to configure mysql to the environment variable

postscript:

If any step fails, be sure to execute the mysql removal command and delete all files in the data directory.

mysqld -remove 

Special reminder: 5.7 is different from 5.6. You need to initialize the data directory yourself, otherwise the startup will not succeed.

Statements that may be used after mysql installation

alter user 'root'@'localhost' identified by '123';
create database victor;
create user 'victor'@'localhost' identified by 'victor@123';
flush privileges;
create user 'victorremote'@'%' identified by 'victorremote@123';
flush privileges;
grant all on victor.* to 'victor'@'localhost' identified by 'victor@123';
flush privileges;
grant all on victor.* to 'victorremote'@'%' identified by 'victorremote@123';
flush privileges;
################################
show variables like 'collation_%';
show variables like 'character_set_%';
set collation_connection=utf8_general_ci;
set character_set_client=utf8;
set character_set_connection=utf8;
set character_set_results=utf8;

mysql configuration parameter query

http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html

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.11 winx64.zip installation and configuration method graphic tutorial
  • MySQL 5.7.11 Green Edition Installation Tutorial with Pictures and Text
  • MySQL 5.7.11 winx64 installation and configuration tutorial
  • Installation and configuration of Mysql5.7.11 on windows10 (decompressed version)
  • MySQL 5.7.11 winx64 installation and configuration method graphic tutorial
  • MySQL 5.7.11 winx64 quick installation and configuration tutorial
  • MySQL 5.7.11 Installation and Configuration Tutorial
  • MySQL 5.7.11 winx64 installation and configuration method graphic tutorial
  • Summary of MySql5.7.11 compilation, installation and root password modification
  • How to install and uninstall MySQL 5.7.11 on Mac

<<:  Detailed steps to start the Django project with nginx+uwsgi

>>:  How to use video.js in vue to play m3u8 format videos

Recommend

How to run the react project on WeChat official account

Table of contents 1. Use the a tag to preview or ...

Detailed tutorial on installing Docker and docker-compose suite on Windows

Table of contents Introduction Download and insta...

How to install MySQL 5.7.17 and set the encoding to utf8 in Windows

download MySQL official download, select Windows ...

Vue implements the question answering function

1. Request answer interface 2. Determine whether ...

In-depth analysis of MySQL 8.0 redo log

Table of contents Preface Generation of redo log ...

JavaScript two pictures to understand the prototype chain

Table of contents 1. Prototype Relationship 2. Pr...

React non-parent-child component parameter passing example code

React is a JAVASCRIPT library for building user i...

A brief analysis of CSS3 using text-overflow to solve text layout problems

Basic syntax The use of text-overflow requires th...

How to use Antd's Form component in React to implement form functions

1. Construction components 1. A form must contain...

The concept and characteristics of MySQL custom variables

A MySQL custom value is a temporary container for...

Centos7.3 automatically starts or executes specified commands when booting

In centos7, the permissions of the /etc/rc.d/rc.l...

How to deploy nginx with Docker and modify the configuration file

Deploy nginx with docker, it's so simple Just...