split CREATE USER and GRANT (Mantis#1727)
[racktables] / tests / README.md
index a3ffe6c81e2a8b8ee9a0aaeb581fe87943f579a8..b938a9cf2b48526c70392b8b6bb1064bfb54e96f 100644 (file)
@@ -42,7 +42,8 @@ Note that you should use the `$db_username` variable contained in
 ```
   mysql -u root -p
   CREATE DATABASE racktables_unittest CHARACTER SET utf8 COLLATE utf8_general_ci;
-  GRANT ALL PRIVILEGES ON racktables_unittest.* TO racktables_user@localhost IDENTIFIED BY 'MY_SECRET_PASSWORD';
+  CREATE USER IF NOT EXISTS racktables_user@localhost IDENTIFIED BY 'MY_SECRET_PASSWORD';
+  GRANT ALL PRIVILEGES ON racktables_unittest.* TO racktables_user@localhost;
   exit
 ```