MySQL: Grammar Quick Reference [Continuously updated…]

1. Define basic tables 1. Commonly used integrity constraints Primary code constraints primary key foreign key constraints foreign key uniqueness constraint unique non-nullity constraint not null value constraints check 2. Example questions [Example 1] Create a “student” table Student, which consists of five attributes: student number Sno, name Sname, gender Ssex, age Sage, and department […]

[MySQL Advanced] Optimize SQL Steps

3. Optimize SQL steps During the application development process, due to the small initial amount of data, developers paid more attention to functional implementation when writing SQL statements. However, when the application system was officially launched, with the rapid increase in the amount of production data, many SQL statements began to gradually appear. Performance problems […]

Linux environment Centos7 installation MySQL5.7 (rpm-bundle.tar)

Table of Contents 1.Download 2. Uninstall 3.Installation 4.Connect 1.Download Official website address: https://dev.mysql.com/downloads/mysql/5.7.html Download results cd /usr/local mkdir mysql rz Upload the downloaded mysql package to the new /usr/local/mysql in linux upload completed 2.Uninstall Clear pre-installed mariadb or mysql 1. Query the installed mariadb and mysql rpm -aq|grep -i mariadb;rpm -aq|grep -i mysql; 2. Uninstall […]

How to find and delete duplicate rows in MySQL?

How to find duplicate rows The first step is to define what rows are duplicates. Most of the time it’s simple: some of their columns have the same values. This example uses this definition. Maybe your definition of “repeat” is very complicated and you need to make some modifications to the sql. Data samples to […]

Initial MySQL (2) (add, delete, check and modify tables)

Table of Contents Modify table CRUD (add, delete, modify, check) insert statement (add data to the table) update statement (modify data in the table) delete delete statement select statement Modify table Add column ALTER TABLE tablename ADD (column datatype [DEFAULT expr] [, column datatype] …); Modify column ALTER TABLE tablename MODIFY (column datatype [DEFAULT expr] […]

jsp+servlet online ordering system (front desk, backend) based on javaweb+mysql (java+jsp+servlet+mysql+dbutil+tomcat)

jsp + servlet online ordering system (front desk, backend) based on javaweb + mysql (java + jsp + servlet + mysql + dbutil + tomcat) Private message Source code acquisition and debugging communication Operating environment Java≥8, MySQL≥5.7, Tomcat≥8 development tools eclipse/idea/myeclipse/sts, etc. can be configured to run Be applicable Course design, major assignments, graduation projects, […]

MySQL replication environment setup

Welcome to follow the public account: Yijie IT The blog posts on this site are published on the public account first. Article directory 1 Environment preparation 2. Mysql8.0 installation 2.2.1 Obtain rpm package 2.2.2 Install and configure MySQL Server 2.2.1 Install database 2.2.2 Initialize database 2.2.3 Remote login 2.2.4 Compatible with old version verification 3 […]

An explanation of transaction isolation and other concurrent transactions in MySQL database

In MySQL, the transaction isolation level defines the situation in which a transaction and other concurrent transactions can see each other’s changed data. The SQL standard specifies four isolation levels, as follows: Serialization (SERIALIZABLE): Transactions are executed serially, that is, each transaction must wait for the end of the previous transaction before starting execution. This […]

Connect mysql to docker image

Introduction: Docker is an open source application container engine that allows developers to package their applications and dependency packages into a portable image, and then publish it to any popular Linux or Windows operating system machine, and can also implement virtualization . Containers completely use the sandbox mechanism and will not have any interfaces with […]

Python connection to MySQL database programming

Database programming is a critical part of interacting with the database and managing data in your application. MySQL is a popular relational database management system (RDBMS), and MySQL database programming is relatively easy in Python. This article introduces how to use Python for MySQL database programming, including operations such as connecting to the database, executing […]