In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following mainly brings you the definition and data manipulation of MySQL. I hope these contents can bring you practical use, which is also the main purpose of this article that I edit the definition and data manipulation of MySQL. All right, don't talk too much nonsense, let's just read the following.
1. Connect to the CVM
The database is cs mode software, so there must be client software to connect to the database. The default port number for mysql database is 3306
1.1window interface connects to the CVM
1.2 Connect through web forms
1.3 Command Line connection
?
1234host-h host port-p port number (uppercase) user-u username password-p password (lowercase)
two。 Basic concepts of database
2.1 Database, table correlation
Database: tables are stored in a database, and multiple tables can be stored in a database
Tables: tables are used to store data.
Relationships: public fields of two tables
Line: also known as record, also known as entity
Columns: also called fields, also called properties
2.2 data correlation
Data redundancy: the same data is stored in different places
two。 Data integrity: correctness + accuracy = data integrity
3. Operation of database
3.1 create a database
?
1create database [if not exists] data name [option]
Summary:
1. If the created database already exists, an error will be reported
two。 If the database name is a keyword and special character, an error is reported.
3. You can specify character encoding when you create a database
3.2 Show all databases
?
1show databases
3.3 Delete the database
?
1drop database [if exists] database name
Summary:
If the deleted database does not exist, an error will be reported
3.4 display the statement to create the database
?
1show create database database name
3.5 modify the database
You can only modify the database options, and the database options are only character encoding.
?
1alter database database name charset= character encoding
3.6 Select a database
?
1use database name
For the above definition of MySQL and data manipulation, we do not think it is very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.