Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A brief Analysis of the search order of configuration Files based on mysql

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following content mainly brings you a brief analysis of the search order of configuration files based on mysql. The knowledge mentioned here, which is slightly different from books, is summed up by professional and technical personnel in the process of contact with users, and has a certain value of experience sharing. I hope to bring help to the majority of readers.

Profile lookup order:

/ etc/my.cnf-> / etc/mysql/my.cnf-- >-- default-extra-file=/PATH/TO/CONF_FILE-- > ~ / .my.cnf

Common components of a relational database:

Database: database

Table: table

Line: row

Column: column

Index: index

View: view

User: user

Permission: privilege

Stored procedure: procedure

Storage function: function

Trigger: trigger

Event Scheduler: event scheduler

SQL statement:

DDL:Data Defination Language

CREATE, DROP, ALTER

DML:Data Manipulation Language

INSERT, DELETE, UPDATE, SELECT

GRANT, REVOKE

CREATE DATABASE | SCHEMA [IF NOT EXISTS] 'DB_NAME'

Such as:

CREATE DATABASE IF NOT EXISTS testdb; / / create a database named testdb

DROP DATABASE | SCHEMA [IF EXISTS] 'DB_NAME'

Such as:

DROP DATABASE IF EXISTS testdb; / / Delete the database, which cannot be recovered after deletion

CHARACTER SET 'charecter set name'

COLLATE 'collate name'

View all character sets supported: SHOW CHARACTER SET

View all supported collations: SHOW COLLATIONS

Get help for using the command:

Mysql > HELP KEYWORD

SHOW DATABASES; / / View the database

Create a table:

CREATE TABLE [IF NOT EXISTS] tb_name (col1datatype modifier, col2 datatype modifier) ENGINE=''

Example:

Use testdb; / / use testdb database

CREATE TABLE IF NOT EXISTS testuser (id int NOT NULL,nameVARCHAR (100) NOT NULL,age tinyint)

/ / create a table

SHOW TABLES; / / View the table

DESC testuser; / / View table structure

Check out all the engines: SHOW ENGINES

View table: SHOW TABLES [FROM db_name]

View the table structure: DESC [db_name.] tb_name

Delete the table:

DROP TABLE [IF EXISTS] tb_name

Data type:

Character type

Fixed length character type: CHAR (#), BINARY (#)

Variable length characters: VARCHAR (#), VARBINARY (#)

Object Storage:

TEXT: case-insensitive

BLOB: character case sensitivity

Built-in type:

ENUM

SET

Numerical type

Exact numerical type

Integer:

Int

Tinyint:1byte

Smallint:2bytes

Mediumint:3bytes

Int:4bytes

Bigint:8bytes

Decimal: decimal

Approximate numerical type

Single precision floating point type: float

Double precision floating point type: double

Modifier:

NOTNULL: non-null constraint

DEFAULTVALUE: setting default values for

For the above brief analysis of the search order of the configuration files on the basis of mysql, if you have more information, you can continue to pay attention to the innovation of our industry. If you need professional solutions, you can contact the pre-sales and after-sales on the official website. I hope this article can bring you some knowledge updates.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report