JDBC SQL injection and transactions

First, prepare the database data, and fill in the data in the database. Independent abstract method, reuse. First, initialize the interface (define a method) Second, verify the user name and password (define another method) package com.bjpowernode.jdbc; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; impor ...

Added by shatztal on Wed, 30 Oct 2019 09:32:06 +0200

(notes to the whole stack) 8.MYSQL optimization summary

1. Database table structure optimization a. select the most applicable field attribute and index According to the actual situation: for example, limit the length of varchar field, set fixed length char; use enum. b. use connections instead of subqueries According to the actual situation: try not to use subquery if it can be rewritten as join.// ...

Added by shadowk on Tue, 29 Oct 2019 16:18:43 +0200

Redis optimizes high and fast performance

Content of this article Using Redis to optimize interface performance in high concurrency scenarios Database optimistic lock With the approaching of the double 11, all kinds of promotional activities began to become popular, and the mainstream ones are seckill, coupons, and so on. The main scenarios involving high concurrency competing for th ...

Added by nOw on Tue, 29 Oct 2019 12:06:26 +0200

Use of SELECT INTO in stored procedure

Using SELECT in MySQL stored procedures... The INTO statement assigns values to variables: Used to save the column values of a row returned by the query to a local variable. Requirement: There can be only 1 row in the result set of the query. SELECT col_name[,...] INTO var_name[,...] table_expr Use SELECT... The INTO statement queries in t ...

Added by SlyOne on Sat, 26 Oct 2019 18:16:42 +0300

MyCat tutorial 6: global serial number - self growth of global primary key

                                  Global primary key auto increment I. self increasing method of local files            &e ...

Added by hometoast on Fri, 25 Oct 2019 16:57:58 +0300

How to develop Java 8 Spring Boot application in Docker?

In this article, I'll show you how to use Java 8 to develop and run simple Spring Web applications without having to install Java 8 on your local machine. Python developers use virtual environments to create and manage separate environments for different projects. Each environment uses different versions of Python to execute, store and parse Py ...

Added by Pellefant on Thu, 24 Oct 2019 12:10:40 +0300

Using logstash to synchronize MySQL data to ES

Summary                         But without special business requirements, the official logstash has its advantages.    when using logstash, we should first understand its characteristics, and then decide whether to use i ...

Added by ztealmax on Tue, 22 Oct 2019 21:17:59 +0300

mysql practice 1: SQL Foundation

mysql introduction and installation mysql introduction mysql is a famous open source relational database. It was first opened by AB company, and later it came to Sun company. After Sun was acquired by Oracle, mysql was owned by Oracle. Since then, mysql has been commercialized, and the database named mariadb has been open-source as a branch of ...

Added by blear on Tue, 22 Oct 2019 01:00:16 +0300

Possible problems in Docker+Atlas implementation of read-write separation

1. Two solutions to slave SQL running: no Enter the slave server and run: mysql> show slave status\G ....... Relay_Log_File: localhost-relay-bin.000535 Relay_Log_Pos: 21795072 Relay_Master_Log_File: localhost-bin.000094 Slave_IO_Running: Yes Slave_SQL_Running: No Replicate_ ...

Added by fizzystutter on Mon, 21 Oct 2019 14:52:30 +0300

Official tool MySQL Router high availability principle and Practice

Before that, I also introduced the articles related to MySQL high availability: Summary of MySQL synchronous replication and high availability schemes Introduction to Mysql route What is mysql route MySQL Router is a lightweight agent between application client and dbserver. It can detect, analyze and forward queries to back-end database insta ...

Added by MidOhioIT on Mon, 21 Oct 2019 08:07:22 +0300