In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Introduction to mysql:
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.
Common commands:
1: use the show statement to find out what databases currently exist on the server:
Mysql > SHOW DATABASES
2: create a database MYSQLDATA
Mysql > CREATE DATABASE MYSQLDATA
3: select the database you created
Mysql > USE MYSQLDATA; (if Database changed appears by pressing enter key, the operation is successful!)
4: see what tables exist in the current database
Mysql > SHOW TABLES
5: create a database table
Mysql > CREATE TABLE MYTABLE (name VARCHAR (20), sex CHAR (1))
6: display the structure of the table:
Mysql > DESCRIBE MYTABLE
7: add records to the table
Mysql > insert into MYTABLE values ("hyq", "M")
8: load data into database tables in text (for example, D:/mysql.txt)
Mysql > LOAD DATA LOCAL INFILE "D:/mysql.txt" INTO TABLE MYTABLE
9: import .sql file command (for example, D:/mysql.sql)
Mysql > use database
Mysql > source d:/mysql.sql
10: delete the table
Mysql > drop TABLE MYTABLE
11: clear the table
Mysql > delete from MYTABLE
12: update data in the table
Mysql > update MYTABLE set sex= "f" where name='hyq'
Corresponding explanation of global administrative permissions:
FILE: read and write files on the MySQL server.
PROCESS: displays or kills service threads that belong to other users.
RELOAD: reload access control tables, refresh logs, etc.
SHUTDOWN: turn off the MySQL service.
Database / data Table / data column permissions:
ALTER: modify existing data tables (such as adding / deleting columns) and indexes.
CREATE: create a new database or data table.
DELETE: deletes the record of the table.
DROP: delete a data table or database.
INDEX: create or delete an index.
INSERT: add the record of the table.
SELECT: show / search the records of the table.
UPDATE: modifies records that already exist in the table.
Special permissions:
ALL: allow to do anything (like root).
USAGE: only login is allowed-nothing else is allowed.
What are the characteristics of mysql:
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.
These are the details of the characteristics of mysql, please pay more attention to other related articles!
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.