From 52e94ebc3c56198d586e04b4fc1191d11a39c9e0 Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Thu, 3 Dec 2020 13:03:38 +0100 Subject: [PATCH] docs(mysql): update grand all privileges command --- databases/mysql.sh | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/databases/mysql.sh b/databases/mysql.sh index 8b54bb3..7efa460 100644 --- a/databases/mysql.sh +++ b/databases/mysql.sh @@ -7,20 +7,4 @@ mysql -u username -p database_name < file.sql # Import d SHOW PROCESSLIST; # Show you any queries that are currently running or in the queue to run -# ***************************************************************************** -# Users and Privileges -# ***************************************************************************** - -# Replace 'host' with '%' to indicate any host - -CREATE USER 'user'@'host'; # Create user -DROP USER 'user'@'host'; # Remove user. - -GRANT ALL PRIVILEGES ON base.* TO 'user'@'host' IDENTIFIED BY 'password'; # Grant access to database using password -GRANT SELECT, INSERT, DELETE ON base.* TO 'user'@'host' IDENTIFIED BY 'password'; # Grant specific privileges to database using password -GRANT ALL PRIVILEGES ON base.* TO 'user'@'host' WITH GRANT OPTION; # Grant **all** privileges on database - -REVOKE ALL PRIVILEGES ON base.* FROM 'user'@'host'; # Remove privileges on database -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'host'; # Remove **all** privileges on database - -FLUSH PRIVILEGES; # Use **only** if you modify grant tables directly using statements like INSERT, UPDATE or DELETE. +GRANT ALL PRIVILEGES ON prospecwith.* TO 'power'@'localhost' WITH GRANT OPTION; # Grant all privileges on database