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

MySQL aggregate function sorting

Table of contents MySQL result sorting - Aggregat...

HTML blockquote tag usage and beautification

Blockquote Definition and Usage The <blockquot...

Examples of preview functions for various types of files in vue3

Table of contents Preface 1. Preview of office do...

How to open a page in an iframe

Solution: Just set the link's target attribute...

Several ways to use require/import keywords to import local images in v-for loop

Table of contents Problem Description Method 1 (b...

vue+ts realizes the effect of element mouse drag

This article example shares the specific code of ...

About React Native unable to link to the simulator

React Native can develop iOS and Android native a...

Detailed explanation of docker compose usage

Table of contents Docker Compose usage scenarios ...

Vue3 compilation process-source code analysis

Preface: Vue3 has been released for a long time. ...

Advantages and Problems of XHTML CSS Website Design

XHTML is the standard website design language cur...

JavaScript implements countdown on front-end web page

Use native JavaScript to simply implement the cou...

How to implement Docker container self-start

Container auto-start Docker provides a restart po...