Remote allowance
This commit is contained in:
@@ -1,15 +1,5 @@
|
|||||||
-- Grant privileges to the user from any host
|
-- This script ensures the user has correct privileges.
|
||||||
-- The MYSQL_USER environment variable in docker-compose usually creates the user with '%' host,
|
-- The user is actually created by the official MySQL image using environment variables.
|
||||||
-- but this script ensures it's correctly set for the specific user and database.
|
|
||||||
|
|
||||||
-- Note: We use the actual user and database names defined in our .env files.
|
GRANT ALL PRIVILEGES ON *.* TO 'escapepage'@'%';
|
||||||
-- If you change DB_USER or DB_NAME in .env, you should update them here too if needed,
|
|
||||||
-- though the Docker image should handle the initial creation correctly.
|
|
||||||
|
|
||||||
CREATE USER IF NOT EXISTS 'escapepage'@'%';
|
|
||||||
-- We don't necessarily want to hardcode the password here if we can avoid it,
|
|
||||||
-- but since it's already in the committed .env.dev, we'll use it for consistency.
|
|
||||||
ALTER USER 'escapepage'@'%' IDENTIFIED BY 'b.0nqrxJ/D*Luf9N';
|
|
||||||
GRANT ALL PRIVILEGES ON `escapepage`.* TO 'escapepage'@'%';
|
|
||||||
GRANT ALL PRIVILEGES ON `escapepage_test`.* TO 'escapepage'@'%';
|
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
|
|||||||
Reference in New Issue
Block a user