mysql is backed up regularly under linux, and the data storage cycle is one week

The following script is from the network, and the copyright belongs to the original author (it is recommended to automatically back up at night, and use cron to plan tasks) #!/bin/bash #Save the number of backups and backup the data for 7 days number=7 #Backup save path backup_dir=/var/erp/data/mysql #date dd=`date +%Y-%m-%d-%H-%M-%S ...

Posted by azwebdiva on Sat, 02 Nov 2019 09:41:23 -0700

Technology sharing | MySQL's join | buffer | size application on internal connection

Author: Yang Taotao This article introduces the use of MySQL parameter join ﹣ BUFFER ﹣ size in the INNER JOIN scenario, which is not included in OUTER JOIN. Before discussing the BUFFER, let's first understand the INNER JOIN classification of MySQL. If it is subdivided according to the retrieval performance, whether it is two or more inner jo ...

Posted by deckrdx on Sat, 02 Nov 2019 08:03:18 -0700

Golang connection operation MySQL database

1. Install MySQL driver Installation mode: open the command line and execute the go command: go get -u github.com/go-sql-driver/mysql 2. Connect MySQL To build a connection, the format is: "user name: password @ tcp(IP: port) / database? charset=utf8" Open the database, the forme ...

Posted by sparc-e on Sat, 02 Nov 2019 05:38:08 -0700

The windowing function of Spark

I. Introduction The window function row ou number() is a function that groups one field and then takes the first values sorted by another field, which is equivalent to grouping topN. If a windowing function is used in the SQL statement, the SQL statement must be executed with HiveContext. II. Code practice [use HiveContext] package big.dat ...

Posted by nezbo on Fri, 01 Nov 2019 16:08:24 -0700

Integration of mybatis and jpa persistence in springboot learning 6

Integrate mybatis Introduction of jar package <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.0.1</version> </dependency> Using springboot to create tables for da ...

Posted by intergroove on Fri, 01 Nov 2019 15:58:46 -0700

Query optimization of exsits and in in mysql

There are two tables in the database, one customer and one order. There are more than 3K customer table data and about 100W order table data. When you need to query the customers whose order status is refund, payment, partial payment and payment, there is a slow page loading problem, which takes about 6s to load. The table structure is as fo ...

Posted by townclown on Fri, 01 Nov 2019 11:52:19 -0700

Jdbc native database connection

I haven't used the native database connection method for a long time, and I almost forget it. I'll take notes for this article. Later, we use some advanced frameworks to operate the database, such as dbutil + c3p0, hibernate, JDBC template, etc. the advanced framework is also built on the basis of the bottom layer. So ...

Posted by binarymonkey on Fri, 01 Nov 2019 06:46:41 -0700

mybatis starter 2

Query users by id sql used: SELECT * FROM `user` WHERE id = 1 Add the select tag in user.xml and write sql: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!-- namespace: Namespace, for isolation sql, ...

Posted by chanw1 on Fri, 01 Nov 2019 03:04:52 -0700

binlog based configuration master and slave of mysql master cluster

I. environmental preparation Main: 192.168.132.121 From: 192.168.132.122 There is data on the main database, and it is still being written. mysql> select * from darren.test; +------+ | id | +------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | +------+ mysql> grant replication slave on *.* to 'replication'@'192 ...

Posted by DarkArchon on Thu, 31 Oct 2019 12:24:59 -0700

FreeSql supports. NetFramework 4.0, ODBC access

It's nearly a year since FreeSql was released as an open source. At present, there are 64118 lines of code in the main warehouse. The commands counted by git command are as follows: find . "(" -name "*.cs" ")" -print | xargs wc -l Add in the code of several other expansion packages, there are about 70000 lines of source code. Warehouse address: ...

Posted by erika_web on Wed, 30 Oct 2019 19:35:57 -0700