Drop connection from mysql
Script to create database school.
CREATE DATABASE school;
Script to create, insert and return data from student table
-- Create table CREATE TABLE student ( id int NOT NULL AUTO_INCREMENT, FirstName varchar(255) NOT NULL, PRIMARY KEY (id) ); -- Insert data; INSERT INTO student(FirstName) values('Sara'); INSERT INTO student(FirstName) values('Kyle'); INSERT INTO student(FirstName) values('John'); -- Access student data; SELECT * FROM student;
How to see currently active connection information. Do the below:
select * from information_schema.processlist;
How to disconnect:
Kill <id-from-processlist-table>;
What was used:
- Mysql which was installed with XAMPP v.3.2.1. Which is Server version: 5.6.24 MySQL Community Server (GPL)
- Windows 8.1
- Netbeans 8.0.2
Reference:
NOTE The sample maven project used for this exercise can be downloaded from |
---|