Creating a web server is generally the first letter of LAMP (linux: Operating System, Apache: http server software, MySQL: database software, and PHP :( sometimes Perl or Python) combined.
Component Analysis:
Linux
Linux is a free open-source software, which means that the source code is available in the operating system.
Apache
Apache is the most popular open source WEB server software.
MySQL
MySQL is a multi-threaded, multi-user SQL database management system.
PHP, (Perl or Python)
PHP is a programming language originally designed to produce dynamic websites.
PHP is mainly used for server applications. Perl is similar to Python.
Contact:
Building a WEB server requires Apache Software, while php is a module executed under apache. When we use php programs on the WEB page to program MySQL, php must support MySQL modules.
Therefore, the software required for configuring a web server mainly includes:
Httpd (Apache main program is provided)
Mysql (MySQL client program)
Mysql-server (MySQL server program)
Php (the main php program contains modules for apache)
Php-mysql (module provided to the php program to read the MySQL database)
Here we will mainly introduce the usage of mysql in web servers.
MySQL:
A database is actually a special file format, which must be read and written through a special interface (database software.
In open-source databases, MySQL is the first choice in terms of performance, stability, and functionality. It can store millions of data records. MySQL and Web servers can be put together at the beginning of the website, however, when the access volume reaches a certain scale, the MySQL database should be isolated from the Web Server and run on a separate Server while maintaining stable connections between the Web Server and the MySQL Server.
Database model classification:
Hierarchical Model
Mesh Model
Relational Model (entity-Relational Model)
Object-link model
Non-Relational Model
Relational Models are currently the most commonly used
MySQL Data Type:
Numeric type: exact numeric type, integer type, approximate numeric type (floating point type)
The integer type includes (tinyint smallint mediumint int (integer ))
The approximate numeric type is also included (single-precision floating-point fioat double-precision floating-point type)
Character Type:
Character (char (length): case-insensitive varchar (length) can be changed character set: character set collate: sorting rules case-sensitive: binary (length) varbinary (length ))
Multi-character: (text: case-insensitive tinytext text midiumtext longtext blob, etc)
As long as it is a character, there are character sets and sorting rules
Internal type (enum: What is defined by enumeration, only set: Defined Characters, can be used in combination)
Date and time type: (date: date time: time date and time: datetime year: year)
The type usually has a modifier: unsigned (unsigned)
Note: Only a part is listed here. If you want to know more types, you can search for them online.
Some commands for database operations in MySQL:
1. database object operations:
Create
Alter
Delete drop
We call it DDL: database defining language.
2. Table operations:
Add insert
Delete
Modify update
Query select
These languages are called DML: database manipulate language database Operation language
3. Control over users and roles:
Grant Permissions
Cancel permission revoke
These operations are called DCL: database conctrolling language database Control language.
Note: (the preceding write command is case insensitive)