In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Overview
MySQL is an open source relational database management system (RDBMS), which uses the most commonly used database management language-structured query language (SQL) for database management.
MySQL is open source, so anyone can download it under the license of General Public License and modify it according to their individual needs.
MySQL has attracted much attention because of its speed, reliability and adaptability. Most people agree that MySQL is the best choice for managing content without the need for transactional processing.
Characteristics
1.MySQL has excellent performance and stable service, with few abnormal downtime.
2.MySQL has the advantages of open source code, no copyright restriction, autonomy and low cost.
3.MySQL has a long history and users are active. If you encounter problems, you can ask for help.
4.MySQL is small in size, easy to install and easy to maintain.
5.MySQL word-of-mouth effect is good, is the enterprise does not need to consider to use it, LAMP, LNMP popular architecture.
6.MySQL supports a variety of operating systems, provides a variety of API interfaces, and supports many development languages, especially PHP.
Basic operation commands of database
DDL operation commands DML operation commands DQL operation commands DCL operation commands MySQL case
MySQL management operation
View the database structure to create records for deleting libraries and table management tables
Basic operation command
View database list information
Overview of SQL statement
SQL language
It is the abbreviation of Structured Query Language, that is, structured query language is the standard language of relational database for maintaining and managing database, such as data query, data update, access control, object management and so on.
SQL classification
DDL: data definition language
DML: data manipulation language
DQL: data query language
DCL: data control language
DDL statement operations (create, delete)
DDL statement is used to create database objects, such as libraries, tables, indexes, etc. Create database: CREATE DATABASE database name create database table: CREATE TABLE table name (field definition … )
DML statement operation
The DML statement is used to manage the data in the table
INSERT: insert new data UPDATE: update existing data DELETE: delete unwanted data
Insert a new data record into the data table
INSERT INTO table name (field, field 2, … ) VALUES (value of field 1, value of field 2, … )
Modify and update data records in the data table
UPDATE table name SET field name 1 = value 1 [, field name 2 = value 2] WHERE conditional expression
Deletes the specified data record in the data table
DELETE FROM table name WHERE conditional expression
Statements without where conditions indicate that all records in the table are deleted (proceed with caution)
Where is followed by a condition. Specify the object. If the condition is not followed, all will be deleted.
DQL statement operation DQL is a data query statement with only one item: SELECT is used to find qualified data records from a data table
1. No conditions can be specified when querying
SELECT field name 1, field name 2... FROM table name
two。 Specify conditions when querying
SELECT field name 1, field name 2... FROM table name WHERE conditional expression
3. Set user permissions (create a new user when the user does not exist)
GRANT permission list ON database name. Table name TO user name @ Source address [IDENTIFIED BY password]
4. View the user's permissions
SHOW GRANTS FOR user name @ Source address
5. Revoke the permissions of a user
REVOKE permission list ON database name. Table name FROM user name @ source address GRANT all ON bbs.* TO 'bbsuser'@'%' IDENTIFIED BY' admin123'
Source address write% represents all IP addresses
Writing all in the permission list means to release all permissions.
Table name write * represents all tables under the database
If the user name already exists, change the user password, and if the user does not exist, create the user directly
The meaning of raising the right of grant
The intention of revoke to withdraw its authority
Real fuck
Create a database
Access to the database
Create a tabl
View the contents of the table
Add the contents of the table
Adding default information cannot be empty. Use default by default if you want to.
View all the contents of the table
Change the contents of the table
Delete records from the table
Delete tabl
Delete Library
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.