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

Understanding Nginx Current Limitation in One Article (Simple Implementation)

Nginx is now one of the most popular load balance...

mysql 5.7.23 winx64 decompression version installation tutorial

Detailed installation tutorial of mysql-5.7.23-wi...

CSS uses calc() to obtain the current visible screen height

First, let's take a look at the relative leng...

Summary of methods to clear cache in Linux system

1) Introduction to cache mechanism In the Linux s...

Reasons why MySQL queries are slow

Table of contents 1. Where is the slowness? 2. Ha...

Share 8 MySQL pitfalls that you have to mention

MySQL is easy to install, fast and has rich funct...

MySQL log trigger implementation code

SQL statement DROP TRIGGER IF EXISTS sys_menu_edi...

Use of vuex namespace

Table of contents Since Vuex uses a single state ...

Analysis of Hyper-V installation CentOS 8 problem

CentOS 8 has been released for a long time. As so...

Vue3.0+vite2 implements dynamic asynchronous component lazy loading

Table of contents Create a Vite project Creating ...

How to manually deploy war packages through tomcat9 on windows and linux

The results are different in Windows and Linux en...

JavaScript Basics Series: Functions and Methods

Table of contents 1. The difference between funct...

Detailed analysis of javascript data proxy and events

Table of contents Data Brokers and Events Review ...

8 ways to manually and automatically backup your MySQL database

As a popular open source database management syst...

Implementation of Nginx configuration Https security authentication

1. The difference between Http and Https HTTP: It...