A preliminary understanding of some simple commands database and MySQL database

First, what database?

database:

Database (DataBase, DB) refers to long-term storage in a storage device on a computer, organized according to certain rules, can be a collection of users or applications to share data.

database system:

Database system (DataBase System, abbreviated as DBS) system is the use of a computer database technology

Database management systems:

Database management system (DataBase Management System, DBMS) is operating a large-scale software and database management, for the establishment, use and maintenance of the database, the database unified management and control, in order to ensure the security and integrity of the database. Users access the data in the database through the database management systems.

Second, the database type

Relational databases: Oracle, DB2, MySql

Non-relational database: MongoDB, Redis

Third, what is the MySQL database?

To facilitate the storage and management of data, it will be data on the disk is stored in accordance with specific rules. Through the database management system that can effectively organize and manage data stored in the database. MySQL is such a relational database management system (RDBMS)

MySQL advantages:

1, anyone can download a free
2, multi-user, multi-threaded data server
3, fast, effective and safe treatment convenient and easy to use large amounts of data

MySQL features:

1, written in C and C ++, and uses a variety of compilers tested to ensure source code portability.
2, support for AIX, FreeBSD, HP-UX, Linux, Mac OS, Novell Netware, OpenBSD, OS / 2 Wrap, Solaris, Windows and other operating systems.
3, for a variety of programming languages provide API. These programming languages including C, C ++, Python, Java , Perl, PHP, Eiffel, Ruby , and Tcl.

MySQL simple command:

Open: service mysql start Or
systemctl start mysql
stop: service mysql stop or
systemctl stop mysql
restart: service mysql restart or
systemctl restart mysql
login: mysql -u root -p password
to view the database: show databases;
create a database: CREATE DATABASE + database name
View current database: select database ();
view the current database encoding format: show variables like 'character_set_database';
see table: show tables;
create the table: cREATE tABLE + table
to view the table structure: DESC table;
view information for a column : DESC ranked table name

Reproduced in: https: //www.jianshu.com/p/1f6a3b506d50

Guess you like

Origin blog.csdn.net/weixin_33885676/article/details/91189659