In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Some basic commands for Linux:
In Linux, most of the operations are achieved through the terminal, or directly use the command line interface, generally use the Linux architecture server, install the command line interface, do not install the graphical interface because it is not necessary, and for the server, the more stable the better, if you use the graphical interface, it is easy to have bug vulnerabilities, for the operating system, the more things installed, the more prone to bug vulnerabilities.
So to learn Linux is mainly to learn its operation commands, here first introduce some simple Linux commands, because we are not doing Linux server architecture, operation and maintenance division, so we do not need to learn all the operation commands in detail.
Linux command:
Su root chooses to log in to root users
Echo $PATH: view the path
/ usr/lib/jvm: view the jvm directory
Yum search java-1.8: search for jdk1.8 versions in the yum library
Yum-y install java-1.8.0-openjdk-devel.x86_64: install the jdk1.8 version
Yum groupinstall Java Platform: install the java platform
Yum install: it installs individual software and its dependencies
Yum groupinstall: it installs an installation package that contains many individual software, as well as individual software dependencies.
Ls: listing directories
Mkdir: create folder
Ll: view catalog details
Vim: create a new file
Vi file name: use vi to edit this file 0
Wq: save exit
Q: exit
! Q: force exit
Init 0: shutdown
Exit: logging out
Export: configure path command
Find-name: find files / folders
-- force-- nodeps: add these two parameters at the end of the software installation to force you not to look for dependencies
Systemctl start service name: enable this service
Systemctl stop service name: turn off this service
Systemctl status service name: view the status of this service
Startx: launch the x graphical window interface
Cal year: displays the calendar for the whole year
Mysql Index:
What is an index? An index is used to optimize the retrieval speed of a column, for example, like a primary key, a column as a primary key can be retrieved much faster than other columns. An index has such an effect that columns optimized with an index are retrieved much faster than other columns.
Indexes are also divided into many kinds, the common indexes are: unique index, combined index, general index, primary key index, full-text index, hash index.
The primary key is also a kind of index, the primary key and the unique index have one thing in common, that is, the values of this column can not be repeated, but there are some differences between the two, because the primary key is symbolic, the value of the primary key cannot be null, and the unique index can have null values.
Create an index:
The keyword of the index is index, and you can specify the length of the index or not when you create the index. The statement format of the index creation:
CREATE INDEX index name ON table name (column name (length of index))
Specify how the index length is created:
Do not specify how the index length is created:
The index can be created when the table is created:
Create a unique index:
Index creation formats other than normal indexes:
CREATE index type INDEX index name ON table name (column name (length of index))
Code example:
Full-text indexing FULLTEXT, columns that use TEXT large text types are suitable for full-text indexing, but are only supported by MYISAM and INNODB engines.
Joint index:
A federated index is to index multiple columns, but the first column must be used when the federated index is used to have an effect, while using the second column or other columns alone has no effect.
Code example:
Indexed usage:
How no indexing effects are used:
Clustered index: the same index is clustered together and the clustered index can be created on the primary key.
HASH index: an index calculated and analyzed using the HASH algorithm
Which column is indexed and which column is used when querying has the meaning of the index?
A query method that has no index meaning:
SELECT * FROM stu WHERE sname='lisi' OR address=' Guangdong'
Delete the index:
Index deletion uses structure delete statements to delete index statement formats:
DROP INDEX index name ON table name
Code example:
Function:
Functions are used to help us do things that sql statements cannot do. Functions, like methods, usually have a return value.
Common functions:
PASSWORD () encrypts the text to a MD5 password
Sysdate () gets the system time
NOW () gets the current time
TRIM () removes spaces
CONCAT () string merging
USER () gets the user name of the current login
Function can be used directly with the select statement:
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.