MySQL [(none)]> use testdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MySQL [testdb]> show tables;
+------------------+
| Tables in testdb |
+------------------+
| t1 |
+------------------+
1 row in set (0.01 sec)
MySQL [testdb]> desc t1;
+-------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| id | int(10) unsigned | NO | PRI | NULL | |
| k | int(10) unsigned | NO | MUL | 0 | |
| c | char(120) | NO | | | |
| pad | char(60) | NO | | | |
+-------+------------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
MySQL [testdb]> insert into t1(id,k,c,pad) values(1,100,'aaa','aaa');
Query OK, 1 row affected (0.05 sec)
MySQL [testdb]> insert into t1(id,k,c,pad) values(2,100,'aaa','aaa');
Query OK, 1 row affected (0.00 sec)
MySQL [testdb]> insert into t1(id,k,c,pad) values(3,100,'aaa','aaa');
Query OK, 1 row affected (0.00 sec)
MySQL [testdb]> insert into t1(id,k,c,pad) values(4,100,'aaa','aaa');
Query OK, 1 row affected (0.01 sec)
MySQL [testdb]> insert into t1(id,k,c,pad) values(5,100,'aaa','aaa');
Query OK, 1 row affected (0.00 sec)
MySQL [testdb]> insert into t1(id,k,c,pad) values(6,100,'aaa','aaa');
Query OK, 1 row affected (0.00 sec)
root@localhost :db202:55:50>select * from t1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 90
Current database: db2
+----+-----+-----+-----+
| id | k | c | pad |
+----+-----+-----+-----+
| 1 | 100 | aaa | aaa |
+----+-----+-----+-----+
1 row in set (0.00 sec)
root@localhost :db203:20:01>use db1;
Database changed
root@localhost :db103:20:05>select * from t1;
+----+-----+-----+-----+
| id | k | c | pad |
+----+-----+-----+-----+
| 6 | 100 | aaa | aaa |
+----+-----+-----+-----+
1 row in set (0.00 sec)