From 0c8c14916baae208e1154d6f676c30d645a9dd51 Mon Sep 17 00:00:00 2001 From: pdiogoantunes Date: Tue, 31 Jan 2017 10:56:44 +0100 Subject: [PATCH] ajout exemple --- HowtoMySQL.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/HowtoMySQL.md b/HowtoMySQL.md index ef625421..cf3e88af 100644 --- a/HowtoMySQL.md +++ b/HowtoMySQL.md @@ -321,7 +321,12 @@ Lister les droits pour tous les accès MySQL créés : ~~~ # mysql -e "select concat('\'',User,'\'@\'',Host,'\'') as '' from mysql.user" | sort | \ -( while read user; do [ -z "$user" ] && continue; echo "-- $user"; mysql -e "show grants for $user"; done ) +( while read user; do [ -z "$user" ] && continue; echo "-- $user :"; mysql -e "show grants for $user"; done ) + +-- 'accesbase'@'localhost' : +Grants for accesbase@localhost +GRANT USAGE ON *.* TO 'accesbase'@'localhost' IDENTIFIED BY PASSWORD '*XXXX' +GRANT ALL PRIVILEGES ON `base`.* TO 'accesbase'@'localhost' ~~~ ## Administration