...
 
Commits (5)
    https://gitcode.net/qq_27525611/SpringBootDemoKotlin/-/commit/2c9bf42c2a1a672c6c56225f76b28ac4b0f1a746 remove unnecessary dependency 2021-07-07T14:43:17+08:00 2293736867 2293736867@qq.com https://gitcode.net/qq_27525611/SpringBootDemoKotlin/-/commit/768c0d12a120481054921b1b786b8932cc9b216b ShardingSphere data sharding and read write splitting 2021-07-07T14:47:24+08:00 2293736867 2293736867@qq.com https://gitcode.net/qq_27525611/SpringBootDemoKotlin/-/commit/001ea6bdf83fc4f3305a34c3e6c450a04a9cb9a8 add dump and conf file 2021-07-07T15:02:48+08:00 2293736867 2293736867@qq.com https://gitcode.net/qq_27525611/SpringBootDemoKotlin/-/commit/6bbd6a0bc661bc3d4302b014a39d253d065bc6bd Update README.md 2021-07-07T15:06:11+08:00 bingling 50223031+2293736867@users.noreply.github.com https://gitcode.net/qq_27525611/SpringBootDemoKotlin/-/commit/19220b6223d5256dcf79b2d93813341ae27bcca6 Update README.md 2021-07-07T15:07:56+08:00 bingling 50223031+2293736867@users.noreply.github.com
......@@ -24,18 +24,19 @@
- [ShardingSphere + MyBatis Plus + MySQL
读写分离和主从复制](https://github.com/2293736867/SpringBootDemoKotlin/tree/main/ShardingSphereMyBatisPlusMySQLMasterSlave)
- [ShardingSphere + MyBaits Plus + MySQL 分库分表](https://github.com/2293736867/SpringBootDemoKotlin/tree/main/ShardingSphereMyBatisPlusDataSharding)
- [ShardingSphere + MyBatis Plus + MySQL 分库分表 + 读写分离](https://github.com/2293736867/SpringBootDemoKotlin/tree/main/ShardingSphereMyBatisPlusDataShardingAndReadWriteSplitting)
# 4 `Kotlin`版实现其他地址
- [Github](https://github.com/2293736867/SpringBootDemoKotlin)
- [码云](https://gitee.com/u6b7b5fc3/SpringBootDemoKotlin)
- [CODE.CHINA](https://codechina.csdn.net/qq_27525611/SpringBootDemoKotlin)
- [CODE CHINA](https://codechina.csdn.net/qq_27525611/SpringBootDemoKotlin)
# 5 `Java`版实现
- [Github](https://github.com/2293736867/SpringBootDemoJava)
- [码云](https://gitee.com/u6b7b5fc3/SpringBootDemoJava)
- [CODE.CHINA](https://codechina.csdn.net/qq_27525611/SpringBootDemoJava)
- [CODE CHINA](https://codechina.csdn.net/qq_27525611/SpringBootDemoJava)
# 6 其他
......
......@@ -3,7 +3,6 @@ package com.example.demo
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator
import com.github.yitter.contract.IdGeneratorOptions
import com.github.yitter.idgen.YitIdHelper
import groovy.util.logging.Slf4j
import org.springframework.stereotype.Component
import javax.annotation.PostConstruct
......@@ -19,4 +18,4 @@ class IdGenerator:IdentifierGenerator {
override fun nextId(entity: Any?):Long?{
return YitIdHelper.nextId()
}
}
\ No newline at end of file
}
# ShardingSphere 分库分表 + 读写分离
详细教程可以参考[博客](https://blog.csdn.net/qq_27525611/article/details/118528939)
# MySQL 配置文件
- `master.cnf`是主节点的配置文件
- `slave.cnf`是从节点的配置文件
注意`binlog-do-db`需要分两行来写,不能直接使用`,`分隔,官方文档有说明,`,`是可以作为数据库名字包含在其中的,也就是说:
```bash
binlog-do-db=test0,test1
```
会被看作是一个叫`test0,test1`的库,而不是一个叫`test0`,一个叫`test1`的库。
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
secure-file-priv= NULL
server-id=1
binlog-do-db=test0
binlog-do-db=test1
# Custom config should go here
!includedir /etc/mysql/conf.d/
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
secure-file-priv= NULL
server-id=2
replicate-do-db=test0
replicate-do-db=test1
# Custom config should go here
!includedir /etc/mysql/conf.d/
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.5.2"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
kotlin("jvm") version "1.5.20"
kotlin("plugin.spring") version "1.5.20"
}
group = "com.example"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_11
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("mysql:mysql-connector-java")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
implementation("com.baomidou:mybatis-plus-boot-starter:3.4.3.1")
implementation("org.apache.velocity:velocity-engine-core:2.3")
implementation("org.realityforge.org.jetbrains.annotations:org.jetbrains.annotations:1.7.0")
implementation("com.alibaba:druid:1.2.6")
implementation("org.apache.shardingsphere:sharding-jdbc-spring-boot-starter:4.1.1")
implementation("com.github.yitter:yitter-idgenerator:1.0.6")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
package com.example.demo
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class DemoApplication
fun main(args: Array<String>) {
runApplication<DemoApplication>(*args)
}
package com.example.demo
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator
import com.github.yitter.contract.IdGeneratorOptions
import com.github.yitter.idgen.YitIdHelper
import org.springframework.stereotype.Component
import javax.annotation.PostConstruct
@Component
class IdGenerator:IdentifierGenerator {
val options = IdGeneratorOptions(1)
@PostConstruct
fun init(){
YitIdHelper.setIdGenerator(options)
}
override fun nextId(entity: Any?):Long?{
return YitIdHelper.nextId()
}
}
\ No newline at end of file
package com.example.demo.user
import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableId
data class User(
@TableId(type = IdType.ASSIGN_ID)
var id: Long?,
var name: String,
var age: Int,
var email: String,
) {
constructor(name: String, age: Int, email: String) : this(null,name,age,email)
}
\ No newline at end of file
package com.example.demo.user
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import java.util.*
@RestController
@RequestMapping("/user")
class UserController {
@Autowired
lateinit var userService: UserServiceImpl
companion object{
val random = Random()
}
@GetMapping("/insert")
fun insert() = userService.save(User("name", random.nextInt(80)+20,"test@test.com"))
@GetMapping("/select")
fun select() = userService.list()
}
\ No newline at end of file
package com.example.demo.user
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface UserMapper:BaseMapper<User>
\ No newline at end of file
package com.example.demo.user
import com.baomidou.mybatisplus.extension.service.IService
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
@Service
class UserServiceImpl:ServiceImpl<UserMapper, User>(),IService<User>
\ No newline at end of file
spring:
shardingsphere:
datasource:
names: master-test0,master-test1,slave-test0,slave-test1
master-test0:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://127.0.0.1:3306/test0
username: root
password: 123456
master-test1:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://127.0.0.1:3306/test1
username: root
password: 123456
slave-test0:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://127.0.0.1:3307/test0
username: root
password: 123456
slave-test1:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://127.0.0.1:3307/test1
username: root
password: 123456
sharding:
default-database-strategy:
inline:
sharding-column: age
algorithm-expression: master-test$->{age % 2}
tables:
user:
actual-data-nodes: master-test$->{0..1}.user$->{0..2}
table-strategy:
inline:
sharding-column: id
algorithm-expression: user$->{id%3}
master-slave-rules:
master-test0:
master-datasource-name: master-test0
slave-data-source-names: slave-test0
master-test1:
master-datasource-name: master-test1
slave-data-source-names: slave-test1
props:
sql:
show:
true
\ No newline at end of file
package com.example.demo
import org.junit.jupiter.api.Test
import org.springframework.boot.test.context.SpringBootTest
@SpringBootTest
class DemoApplicationTests {
@Test
fun contextLoads() {
}
}
# mysqldump 导出文件
使用时直接使用`mysqldump`导入即可。
首先创建好两个库:
```mysql
create database test0;
create database test1;
```
接着导入:
```bash
mysqldump -u root -p < master.db
```
-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
--
-- Host: localhost Database: test0
-- ------------------------------------------------------
-- Server version 8.0.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Current Database: `test0`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test0` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `test0`;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user0`
--
DROP TABLE IF EXISTS `user0`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user0` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user0`
--
LOCK TABLES `user0` WRITE;
/*!40000 ALTER TABLE `user0` DISABLE KEYS */;
INSERT INTO `user0` VALUES (177937894588485,'test name',34,'test@test.com'),(177937911459909,'test name',54,'test@test.com'),(177937933234245,'test name',62,'test@test.com'),(177986645717061,'test name',22,'test@test.com'),(178192082350149,'name',36,'test@test.com'),(178192109875269,'name',82,'test@test.com');
/*!40000 ALTER TABLE `user0` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user1`
--
DROP TABLE IF EXISTS `user1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user1` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user1`
--
LOCK TABLES `user1` WRITE;
/*!40000 ALTER TABLE `user1` DISABLE KEYS */;
INSERT INTO `user1` VALUES (177937813430341,'test name',58,'test@test.com'),(177938001510469,'test name',52,'test@test.com'),(177938100994117,'test name',58,'test@test.com'),(177985635291205,'test name',86,'test@test.com'),(177986677755973,'test name',34,'test@test.com');
/*!40000 ALTER TABLE `user1` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user2`
--
DROP TABLE IF EXISTS `user2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user2` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user2`
--
LOCK TABLES `user2` WRITE;
/*!40000 ALTER TABLE `user2` DISABLE KEYS */;
INSERT INTO `user2` VALUES (177937737605189,'test name',86,'test@test.com'),(177937771569221,'test name',20,'test@test.com'),(177937949585477,'test name',52,'test@test.com'),(177937980035141,'test name',40,'test@test.com'),(177938027675717,'test name',30,'test@test.com'),(177986626347077,'test name',62,'test@test.com');
/*!40000 ALTER TABLE `user2` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Current Database: `test1`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test1` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `test1`;
--
-- Table structure for table `user0`
--
DROP TABLE IF EXISTS `user0`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user0` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user0`
--
LOCK TABLES `user0` WRITE;
/*!40000 ALTER TABLE `user0` DISABLE KEYS */;
INSERT INTO `user0` VALUES (177938057982021,'test name',53,'test@test.com'),(177986656321605,'test name',27,'test@test.com');
/*!40000 ALTER TABLE `user0` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user1`
--
DROP TABLE IF EXISTS `user1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user1` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user1`
--
LOCK TABLES `user1` WRITE;
/*!40000 ALTER TABLE `user1` DISABLE KEYS */;
INSERT INTO `user1` VALUES (178192100921413,'name',77,'test@test.com');
/*!40000 ALTER TABLE `user1` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user2`
--
DROP TABLE IF EXISTS `user2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user2` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user2`
--
LOCK TABLES `user2` WRITE;
/*!40000 ALTER TABLE `user2` DISABLE KEYS */;
INSERT INTO `user2` VALUES (177985650556997,'test name',85,'test@test.com');
/*!40000 ALTER TABLE `user2` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-07-07 6:52:40
-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
--
-- Host: localhost Database: test0
-- ------------------------------------------------------
-- Server version 8.0.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Current Database: `test0`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test0` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `test0`;
--
-- Table structure for table `user0`
--
DROP TABLE IF EXISTS `user0`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user0` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user0`
--
LOCK TABLES `user0` WRITE;
/*!40000 ALTER TABLE `user0` DISABLE KEYS */;
INSERT INTO `user0` VALUES (177937894588485,'test name',34,'test@test.com'),(177937911459909,'test name',54,'test@test.com'),(177937933234245,'test name',62,'test@test.com'),(177986645717061,'test name',22,'test@test.com'),(178192082350149,'name',36,'test@test.com'),(178192109875269,'name',82,'test@test.com');
/*!40000 ALTER TABLE `user0` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user1`
--
DROP TABLE IF EXISTS `user1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user1` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user1`
--
LOCK TABLES `user1` WRITE;
/*!40000 ALTER TABLE `user1` DISABLE KEYS */;
INSERT INTO `user1` VALUES (177937813430341,'test name',58,'test@test.com'),(177938001510469,'test name',52,'test@test.com'),(177938100994117,'test name',58,'test@test.com'),(177985635291205,'test name',86,'test@test.com'),(177986677755973,'test name',34,'test@test.com');
/*!40000 ALTER TABLE `user1` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user2`
--
DROP TABLE IF EXISTS `user2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user2` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user2`
--
LOCK TABLES `user2` WRITE;
/*!40000 ALTER TABLE `user2` DISABLE KEYS */;
INSERT INTO `user2` VALUES (177937737605189,'test name',86,'test@test.com'),(177937771569221,'test name',20,'test@test.com'),(177937949585477,'test name',52,'test@test.com'),(177937980035141,'test name',40,'test@test.com'),(177938027675717,'test name',30,'test@test.com'),(177986626347077,'test name',62,'test@test.com');
/*!40000 ALTER TABLE `user2` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Current Database: `test1`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test1` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `test1`;
--
-- Table structure for table `user0`
--
DROP TABLE IF EXISTS `user0`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user0` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user0`
--
LOCK TABLES `user0` WRITE;
/*!40000 ALTER TABLE `user0` DISABLE KEYS */;
INSERT INTO `user0` VALUES (177938057982021,'test name',53,'test@test.com'),(177986656321605,'test name',27,'test@test.com');
/*!40000 ALTER TABLE `user0` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user1`
--
DROP TABLE IF EXISTS `user1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user1` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user1`
--
LOCK TABLES `user1` WRITE;
/*!40000 ALTER TABLE `user1` DISABLE KEYS */;
INSERT INTO `user1` VALUES (178192100921413,'name',77,'test@test.com');
/*!40000 ALTER TABLE `user1` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user2`
--
DROP TABLE IF EXISTS `user2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user2` (
`id` bigint NOT NULL,
`name` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`age` int NOT NULL,
`email` varchar(45) COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user2`
--
LOCK TABLES `user2` WRITE;
/*!40000 ALTER TABLE `user2` DISABLE KEYS */;
INSERT INTO `user2` VALUES (177985650556997,'test name',85,'test@test.com');
/*!40000 ALTER TABLE `user2` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-07-07 6:53:51