mysql 5.7.20 win64 installation and configuration method

mysql 5.7.20 win64 installation and configuration method

mysql-5.7.20-winx64.zipInstallation package without installation steps:

https://dev.mysql.com/downloads/file/?id=473309

Environment variables settings:

Put C:\Program Files\mysql-5.7.20-winx64\bin in Path

Right click -- Command Prompt (Administrator) -- cd C:\software\mysql\mysql-5.7.20-winx64\bin -- subsequent steps:

1.mysqld install

2. Initialize the mysql data directory (there is no such directory after decompressing mysql-5.7) and generate a password: mysqld --initialize-insecure Success is no response

3. Execute net start mysql in the DOS interface (any directory)

4. Execute mysql -uroot in the DOS interface (any directory) to log in as the root user

5.update user set authentication_string=password('123456') where user='root' and Host = 'localhost'; Set the password to 123456

#### update MySQL.user set authentication_string=password('root') where user='root';

6.mysql -u root -p; (Log in to mysql with password)

7.net stop mysql --mysqld remove, try to install again

  1. Header: the name of each column;
  2. Column: A collection of data with the same data type;
  3. Row (col): Each row is used to describe specific information about a person/thing;
  4. Value: The specific information of the row. Each value must be the same as the data type of the column.
  5. Key: A method used to identify a specific person or thing in a table. The key value is unique in the current column.

Log in to MySQL

When the MySQL service is already running, we can log in to the MySQL database through the MySQL client tool. First, open the command prompt and enter the following format:

mysql -h hostname -u username -p

  • -h: This command is used to specify the MySQL host name that the client wants to log in to. This parameter can be omitted when logging in to the current machine;
  • -u: the user name to log in;
  • -p: Tell the server that a password will be used to log in. If the username and password to be logged in are empty, this option can be ignored.

Take the example of logging in to the MySQL database just installed on the local machine. Enter mysql -u root -p in the command line and press Enter to confirm. If the installation is correct and MySQL is running, you will get the following response:

Enter password:

If the password exists, enter it to log in. If it does not exist, just press Enter to log in. According to the installation method in this article, the default root account has no password. After a successful login, you will see the prompt We are coming to the MySQL monitor...

The command prompt will then continue with mysql> with a blinking cursor, waiting for command input. Enter exit or quit to log out.

Create a database

Use the create database statement to create a database. The format of the creation command is as follows:

create database 數據庫名[其他選項];

For example, we need to create a database named samp_db, execute the following command in the command line:

create database samp_db character set gbk;

In order to display Chinese characters in the command prompt, the database character encoding is specified as gbk through character set gbk during creation. If the creation is successful, you will get the response "Query OK, 1 row affected(0.02 sec)".

Note: MySQL statements end with a semicolon (;). If you do not add a semicolon at the end of a statement, the command prompt will prompt you to continue inputting with -> (there are some exceptions, but adding a semicolon is definitely not wrong);

Tip: You can use the show databases; command to see which databases have been created.

Using mysqladmin method:

Open the command prompt interface and execute the command: mysqladmin -u root -p password 新密碼

After execution, you will be prompted to enter the old password to complete the password change. If the old password is empty, just press Enter to confirm.

MySQL Workbench official introduction: http://www.mysql.com/products/workbench/

MySQL Workbench download page: http://dev.mysql.com/downloads/tools/workbench/

Summarize

The above is the installation and configuration method of MySQL 5.7.20 win64 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:
  • MySql 8.0.16-win64 Installation Tutorial
  • Detailed process of building mysql5.7.29 on centos7 of linux
  • MySQL 5.7.29 + Win64 decompression version installation tutorial with pictures and text

<<:  Vue Router vue-router detailed explanation guide

>>:  Analysis and solution of abnormal problem of loading jar in tomcat

Recommend

How to understand JavaScript modularity

Table of contents 1. Browser support 2. export ex...

Example of MySQL slow query

Introduction By enabling the slow query log, MySQ...

How to view mysql binlog (binary log)

For example, when you create a new table or updat...

JavaScript imitates Taobao magnifying glass effect

This article shares the specific code for JavaScr...

Introduction to the process of building your own FTP and SFTP servers

FTP and SFTP are widely used as file transfer pro...

How to choose transaction isolation level in MySQL project

introduction Let's start with our content. I ...

Example of deploying Laravel application with Docker

The PHP base image used in this article is: php:7...

How to read the regional information of IP using Nginx and GeoIP module

Install GeoIP on Linux yum install nginx-module-g...

Search optimization knowledge to pay attention to in web design

1. Link layout of the new site homepage 1. The loc...

Execute the shell or program inside the Docker container on the host

In order to avoid repeatedly entering the Docker ...

Simple web design concept color matching

(I) Basic concepts of web page color matching (1) ...

Drawing fireworks effect of 2021 based on JS with source code download

This work uses the knowledge of front-end develop...

mysql-8.0.16 winx64 latest installation tutorial with pictures and text

I just started learning about databases recently....

Learn MySQL database in one hour (Zhang Guo)

Table of contents 1. Database Overview 1.1 Develo...

Install three or more tomcats under Linux system (detailed steps)

If you want to install multiple tomcats, you must...