diff --git a/setup_mysql_dev.sql b/setup_mysql_dev.sql new file mode 100644 index 000000000000..25d37ef77567 --- /dev/null +++ b/setup_mysql_dev.sql @@ -0,0 +1,11 @@ +-- Create the hbnb_dev_db database if it does not already exist +CREATE DATABASE IF NOT EXISTS hbnb_dev_db; + +-- Create the hbnb_dev user if it does not already exist +CREATE USER IF NOT EXISTS 'hbnb_dev'@'localhost' IDENTIFIED BY 'hbnb_dev_pwd'; + +-- Grant all privileges to hbnb_dev user on hbnb_dev_db database +GRANT ALL PRIVILEGES ON hbnb_dev_db.* TO 'hbnb_dev'@'localhost'; + +-- Grant select privilege to hbnb_dev user on performance_schema database +GRANT SELECT ON performance_schema.* TO 'hbnb_dev'@'localhost';