From 98268aec468ab9b887afc0c637f8dc91ccdb49be Mon Sep 17 00:00:00 2001 From: Miguel Reboiro Jato Date: Fri, 20 Oct 2023 14:20:37 +0200 Subject: [PATCH] Adds user creation to MySQL script Apart from creatint the database, now the MySQL script also creates the required user. --- sql/employees.mysql.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/employees.mysql.sql b/sql/employees.mysql.sql index 887dccb..20ae0e9 100644 --- a/sql/employees.mysql.sql +++ b/sql/employees.mysql.sql @@ -1,6 +1,10 @@ CREATE DATABASE IF NOT EXISTS `employees`; USE `employees`; +CREATE USER IF NOT EXISTS `kata3`@`localhost` IDENTIFIED BY "kata3"; +GRANT ALL ON `employees`.* TO `kata3`@`localhost`; +FLUSH PRIVILEGES; + DROP TABLE IF EXISTS Employees; CREATE TABLE `employees`.`Employees` ( -- 2.18.1