CREATE DATABASE lip_db CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE lip_db;
CREATE TABLE `lip_table` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`employee_id` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`employee_name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`datetime` DATETIME NULL DEFAULT NULL,
	`device_name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`id`) USING BTREE
) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB;

GRANT USAGE ON *.* TO 'lip_user'@'%';
GRANT EXECUTE, SELECT, SHOW VIEW, ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, INSERT, REFERENCES, TRIGGER, UPDATE, LOCK TABLES  ON `lip_db`.* TO 'lip_user'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;