Extracting data from a JSON string using MySQL

Extracting data from a JSON string using MySQL In modern database management, the JSON format is widely used due to its flexibility. However, when data is stored in JSON, we often need to convert it to a more manageable format. This article will demonstrate, through a specific SQL query example, how to extract and reformat … Read more

Git Command Reference

Basic operations # Initialize repositorygit init# Clone remote repositorygit clone <repo_url># View current statusgit status# Add all modifications to the temporary storage areagit add .# Submit to local warehousegit commit -m “submission common”# View Submission History git log –oneline# View file modification differencesgit diff Branch Management # Create a new branchgit branch <branch_name># switch branchgit … Read more

In Git, there are methods to undo (roll back) a merge operation

In Git, there are several ways to undo (rollback) merge an operation, depending on whether a commit has been made, whether a push has been made, and whether a history needs to be retained. Here are some common undo  merge methods: 1. Not submitted  merge (not submitted  commit) If  merge you haven’t submitted it yet, you can use the following methods to undo … Read more

Git remote operation and tag management

I. Remote Operation 1.1 Distributed Version Control System A distributed version control system, simply put, is a central server repository connected to multiple local server repositories. This allows multiple developers to view their respective code. 1.2 Cloning a remote repository Using HTTPS protocol: There are no requirements when using HTTPS, and you can directly clone … Read more

Advanced Git Local Operations: Version Revert, Undo Changes, and File Deletion

Foreword: After mastering the basic operations of a Git local repository, “how to correct erroneous commits,” “how to recover accidentally deleted files,” and “the risks and solutions for version rollback” become key topics for developers to advance. In code development, accidental changes to configurations, committing redundant files, and deleting core code are unavoidable. Git’s version rollback, … Read more

MySQL transactions

I. Reasons for using transactions In many cases, we need to execute a set of operations that either all fail or all succeed. For example, in a bank transfer, one user transfers money to another, deducting funds from the first user’s account and increasing the second user’s balance. Imagine if the MySQL server crashes after … Read more

Advanced MySQL Database: Complete Analysis of SQL Query Statements

I. Basic Queries: Retrieving Data from Tables 1.1 Syntax Format 1.2 Practical Examples Assuming a table named `student` exists, containing fields `id`, `name`, `sex`, `age`, and `class_num`, a basic query is demonstrated: # Query all fields (* represents all fields) SELECT * FROM student; # Query specific fields (name, sex) SELECT name, sex FROM student; … Read more

Nginx deployment and usage

I. Gateway 1.  Nginx (Traffic Gateway) 2.  Gateway (Business Gateway) 3.  API Gateway Relationship summary: There are also mutual calls between the business gateway, API gateway, and microservices: Follow the five-tuple : source IP, source port, destination IP, destination port, protocol II. The Relationship Between DNS, Domain Names, and IP Addresses An IP address is a device’s “unique ID … Read more

301 HTTP Status Code Explained and Applied

When browsing the web, you may have encountered situations where clicking a link automatically redirects the page to another address. Or, to be more technical, as a website developer, you might need to upgrade your website’s domain  http:// or  https://redirect older pages to newer URLs. Behind these scenarios, an important HTTP status code is at play— 301 . What is … Read more

A comprehensive guide to used Git commands and commit/pull instructions.

1. Repository Initialization and Configuration 2. Remote warehouse operations # Add a remote repository: `git remote add origin <remote repository URL> ` # View remote repositories: `git remote -v` # Modify the remote repository URL: `git remote set-url origin <new remote repository URL> ` # Delete a remote repository: `git remote remove origin` 3. Branch … Read more