Detailed explanation of MySQL from getting started to giving up - installation

Detailed explanation of MySQL from getting started to giving up - installation

What you will learn

1. Software installation and server settings.

2. (Optional, but highly recommended) Use the graphical interface software Navicat for SQL

3. Database Basics

  1. Database definition
  2. Relational Database
  3. Two-dimensional table
  4. OK
  5. List
  6. Primary Key
  7. Foreign Keys

4.MySQL database management system

  1. database
  2. Data Sheet
  3. view
  4. Stored Procedures

Software Installation

MySQL download link: MySQL

Download the first one and unzip it.

My directory is C:\Users\Public\MySQL, and then configure my.ini in this folder

Next, start MySQL and operate in cmd

cd C:\Users\Public\MySQL\bin
mysqld --initialize --console

There is an initial password after execution

...
2019-03-31T01:49:30.418915Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: P7Lh=6hEkl0!
...

P7Lh=6hEkl0! is the initial password, then you can install and start

mysqld install
net start mysql

The installation is now successful and you can log in to MySQL.
Just enter the following statement:

mysql -h hostname -u username -p

Parameter Description:

  1. -h: specifies the MySQL host name that the client wants to log in to. This parameter can be omitted when logging in to the local machine (localhost or 127.0.0.1);
  2. -u : login user name;
  3. -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.

The MySQL command to log in to the local machine is simpler:

mysql -u root -p

Simply enter your previous password. If successful, Welcome to the MySQL monitor... will be displayed.
Then the command prompt will continue to display 'mysq>' with a blinking cursor, waiting for command input. Enter exit or quit to log out.
First change the default password. Here is the statement for the new version of MySQL

alter user user() identified by "123456";

Next we install navicat
Downloaded a trial version of Navicat from the official website
After the installation is successful, you can play happily

Basics

Database definition: The term database is used in many ways, but from the SQL perspective, a database is a collection of data stored in some organized manner. Or a container to hold organized data.

Relational database: Simply put, a relational database is a database composed of multiple two-dimensional row and column tables that can be connected to each other.

Two-dimensional table: that is, data table. In the relational model, the data structure is represented as a two-dimensional table, and a relation is a two-dimensional table. The first row in the table is usually called the attribute name. Each tuple and attribute in the table is indivisible, and the order of the tuples is irrelevant.

Row: The data in the table is stored in rows, and each saved record is stored in its own row. A row is a record in a table.
Columns: Tables consist of columns. A column is a field in a table that stores a portion of information in the table. All tables are composed of one or more columns.

Primary key: A column (or set of columns) in a table whose value uniquely identifies each row in the table. Without a primary key, it is extremely difficult to update or delete specific rows in a table.
Foreign key: A foreign key is a column in one table that contains the primary key value of another table and defines the relationship between the two tables.

View: A view is a virtual table. Unlike tables, which contain data, views contain only queries that dynamically retrieve data when used. Using views can simplify complex SQL query statements.

Stored procedure: Simply put, a stored procedure is one or more SQL statements saved for later use. Think of them as batch files, although their use is not limited to batch processing. Stored procedures can simplify operations and facilitate the management of changes, etc.

The above is what I introduced to you: MySQL from getting started to giving up - detailed installation and integration. I hope it will be helpful to you. If you have any questions, please leave me a message and I 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:
  • Summary of Common Commands for Getting Started with MySQL Database Basics
  • MySQL database introduction: detailed explanation of database backup operation
  • MySQL database introduction: detailed explanation of multi-instance configuration method
  • MySQL Database Basics: A Summary of Basic Commands
  • MySQL Basics in 1 Hour
  • MySQL Basics in 20 Minutes
  • MySQL Quick Start in 30 Minutes (with Pictures)
  • Getting started with MySQL Basics Learn MySQL commands easily
  • MySQL Getting Started Tutorial in 21 Minutes
  • MySQL commonly used SQL and commands from entry to deleting database and running away

<<:  The solution to the page not refreshing after the route changes after react jumps

>>:  VMware vsphere 6.5 installation tutorial (picture and text)

Recommend

Tutorial on installing mysql5.7.18 on mac os10.12

I searched the entire web and found all kinds of ...

Analysis and treatment of scroll bars in both HTML and embedded Flash

We often encounter this situation when doing devel...

Detailed explanation of MySQL database transaction isolation levels

Database transaction isolation level There are 4 ...

Detailed explanation of building MySQL master-slave environment with Docker

Preface This article records how I use docker-com...

Workerman writes the example code of mysql connection pool

First of all, you need to understand why you use ...

JS realizes the effect of Baidu News navigation bar

This article shares the specific code of JS to ac...

MySQL 8.0.13 installation and configuration method graphic tutorial

This article shares the installation and configur...

Specific use of lazy loading and preloading in js

Delayed loading (lazy loading) and preloading are...

12 types of component communications in Vue2

Table of contents 1. props 2..sync 3.v-model 4.re...

How to install docker and portainer in kali

With the emergence of docker, many services have ...

How to install Apache service in Linux operating system

Download link: Operating Environment CentOS 7.6 i...

Summary of the use of Vue computed properties and listeners

1. Computed properties and listeners 1.1 Computed...