--
-- Create database
--

DROP DATABASE IF EXISTS `PHPStarter`;
CREATE DATABASE IF NOT EXISTS `PHPStarter`;

USE `PHPStarter`;

--
-- Create user for database
--

DROP USER IF EXISTS 'PHPStarter_user'@'localhost';
CREATE USER 'PHPStarter_user'@'localhost' IDENTIFIED BY '';

GRANT ALL PRIVILEGES ON `PHPStarter`.* TO 'PHPStarter_user'@'localhost';
FLUSH PRIVILEGES;

--
-- Drop tables
--

DROP TABLE IF EXISTS `PHPStarter`;

--
-- Table structure for 'PHPStarter'
--

CREATE TABLE `PHPStarter` (
	`id` INT AUTO_INCREMENT PRIMARY KEY,
	`message` VARCHAR(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Reset 'PHPStarter'
--

DELETE FROM `PHPStarter`;
ALTER TABLE `PHPStarter` AUTO_INCREMENT = 1;

INSERT INTO `PHPStarter` (`message`) VALUES
("Welcome to PHPStarter");
