Get the App
SLTechnology News&Howtos  ›  Database  › 

Introduction and installation method of MySQL Database

Shulou Source: shulou.com Published: 2022-05-31 18:06:20 09月30日 Update

This article introduces the relevant knowledge of "introduction and installation of MySQL database". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

I. introduction of MySQL database

MySQL is a relational database management system developed by the Swedish company MySQL AB and belongs to the products of Oracle. MySQL is one of the most popular relational database management systems. In the aspect of WEB application, MySQL is one of the best RDBMS (Relational Database Management System) application software.

MySQL is a relational database management system in which relational databases store data in different tables instead of all data in one large warehouse, which increases speed and flexibility.

The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software adopts the dual licensing policy, which is divided into community version and commercial version. Because of its small size, high speed and low total cost of ownership, especially open source, the development of small and medium-sized websites generally choose MySQL as the website database.

II. Relational database and non-relational database

Database is generally divided into relational database and non-relational database. Redis is a non-relational database.

1. Relational database-sql

Use the SQL statement for the operation.

The data is stored on disk.

Common relational databases are MySQL, Oracle, SqlServer and sqlite.

two。 Non-relational database-nosql

Does not rely on sql statements.

The data is stored in memory.

Data can be persisted.

III. Installation of MySQL database

I use the CentOS system myself, so the following descriptions are available for CentOS, and the Ubuntu system should be different.

download

Log in to the official website and download the address to get an installation package mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar.

Decompression

Extract the installation package $tar-xvf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar

Get the following installation packages

Mysql-community-client-5.7.28-1.el7.x86_64.rpm

Mysql-community-common-5.7.28-1.el7.x86_64.rpm

Mysql-community-devel-5.7.28-1.el7.x86_64.rpm

Mysql-community-embedded-5.7.28-1.el7.x86_64.rpm

Mysql-community-embedded-compat-5.7.28-1.el7.x86_64.rpm

Mysql-community-embedded-devel-5.7.28-1.el7.x86_64.rpm

Mysql-community-libs-5.7.28-1.el7.x86_64.rpm

Mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm

Mysql-community-server-5.7.28-1.el7.x86_64.rpm

Mysql-community-test-5.7.28-1.el7.x86_64.rpm

Installation

We only need to install these four.

Mysql-community-libs-5.7.28-1.el7.x86_64.rpm

Mysql-community-common-5.7.28-1.el7.x86_64.rpm

Mysql-community-client-5.7.28-1.el7.x86_64.rpm

Mysql-community-server-5.7.28-1.el7.x86_64.rpm

$rpm-ivh mysql-community-libs-5.7.28-1.el7.x86_64.rpm

$rpm-ivh mysql-community-common-5.7.28-1.el7.x86_64.rpm

$rpm-ivh mysql-community-client-5.7.28-1.el7.x86_64.rpm

$rpm-ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm

Start up

Once it's all installed, we can start mysql server.

$service mysqld start

Check to see if the process starts successfully.

$ps aux | grep "mysql-*"

Log in

A password is required for the first login.

$mysql-u root-p

The initial password is in / var/log/mysqld.log.

$cat / var/log/mysqld.log

Enter the password to access the database.

Change the password.

When you get in, you can change the password.

$mysql > set password = password ('your password').

It should be noted here that the newly set password must meet the requirements.

1. There must be a special symbol.

two。 There must be uppercase and lowercase letters.

3. Numbers must be included.

4. The length must be greater than 8 characters.

Just refresh it at last.

$mysql > FLUSH PRIVILEGES

In this way, our MySQL is installed.

This is the end of the introduction and installation of MySQL database. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Data database password system management system management website login method content letter more knowledge statement language software speed storage application development Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Xiaomi Redmi Apple Shulou Technology