先创建一张表: -- 创建用户表 CREATE TABLE user10( id SMALLINT UNSIGNED KEY AUTO_INCREMENT, username ) NOT NULL UNIQUE, password ) NOT NULL, email ) NOT NULL DEFAULT 'a@a.com', age , addr ) NOT NULL DEFAULT '北京', salary ,2), regTime INT UNSIGNED, face ) NOT NULL
原文地址:http://nkcoder.github.io/blog/20140712/mysql-reconnect-packet-lost/ 1.1 错误信息: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 20,820,001 milliseconds ago. The last pac
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 20,820,001 milliseconds ago. The last packet sent successfully to the server was 20,820,002 milliseconds ago. is longer than
首先创建目标库 create database trgdb; 获取所有源库的表名 use information_schema; select table_name from TABLES where TABLE_SCHEMA=’srcdb’; 然后按照以下命令一个个修改 rename table srcdb.[tablename] to trgdb.[tablename]; 一个个执行下来之后表就转到新的库里面了.