Database --- mysql (01) -- database management system, linux installation mysql

MYSQL

1. Introduction to database

Data : Symbolic records describing things, which can be numbers, text, graphics, images, sounds, languages, etc. There are many forms of data, and they can all be digitized and stored in computers.

Database : A warehouse for storing data, which is a collection of large amounts of organized and shareable data stored in computers for a long time.
The data in the database is organized, described and stored according to a certain data model, which has low redundancy, high independence and easy scalability, and is shared by various users. It is summarized as follows:

  • data structuring
  • High data sharing, low redundancy, and easy expansion
  • High data independence
  • Data is uniformly managed and controlled by the DBMS (security, integrity, concurrency control, failure recovery)

2. Database management system

The DBMS is the repository of all data and is responsible for data storage, security, consistency, concurrent operations, recovery, and access.

(1) Data model supported by DBMS

(2) Classification:

Database management system has relational database management system and non-relational database management system

  • MongoDB, HBASE, and redis are non-relational databases;
  • Mysql, IBM, oracle, sql server , etc. are all relational databases;

<1> Relational database management system:

  • Data storage structure: two-dimensional table structure
  • Query capability: support complex queries
  • Data consistency: strong consistency ACID enables data access requirements with high security performance to be realized
  • high value

<2> Non-relational database management system:

  • Data storage structure: a collection of data structured storage methods, which can be documents or key-value pairs;
  • Query ability: lack of complex query;
  • Good scalability;
  • No concept of transaction processing;
  • High scalability;
  • low cost;

<3> Contrast

3. Introduction to MYSQL

(Version selection: version 5.7.17 or above, with MVV--high concurrency mechanism)

MySQL is a small relational database management system, developed by the Swedish MySQL AB company, which was acquired by Sun for 1 billion US dollars on January 16, 2008.

(1) Ranking and Applicable Scenarios

Database Ranking : DB-Engines Ranking - popularity ranking of database management systems

Applicable scenarios : Internet company web site system, data warehouse system, logging system, embedded system

(2) mysql architecture

Mysql is composed of SQL interface, parser, optimizer, cache, and storage engine.

  • Connectors refer to the interaction with SQL in different languages.
  • Management Serveices & Utilities : System management and control tools.
  • Connection Pool : connection pool. Manage cached user connections, thread processing, etc. that require caching.
  • SQL Interface : SQL interface. Accept the user's SQL command and return the result that the user needs to query. For example, select from is to call SQL Interface.
  • Parser : parser. When the SQL command is passed to the parser, it will be verified and parsed by the parser.
  • Optimizer : query optimizer. The SQL statement will use the query optimizer to optimize the query before querying.
  • Cache and Buffer : Query cache. If the query cache has a hit query result, the query statement can directly fetch data from the query cache.
  • Engine : the storage engine. The storage engine is a specific subsystem in MySql that deals with files.

(3) install mysql in linux

<1> Download application software

<2> Install application software

<3> Check the installation status

<4> The default module is disabled

<5> Install the service module

<6> Modify the configuration file

skip-grant-tables --- password-free login

character-set-server=gbk
lower_case_table_names=1
innodb_flush_log_at_trx_commit = 2
log-bin-trust-function-creators=1



<7> Application initialization

<8> Start the database

<9> Login to the database

Guess you like

Origin blog.csdn.net/weixin_62443409/article/details/131550724