diff --git a/deploy/windows/installer/ShopDBFlask.iss b/deploy/windows/installer/ShopDBFlask.iss index c83ab42..13ae67d 100644 --- a/deploy/windows/installer/ShopDBFlask.iss +++ b/deploy/windows/installer/ShopDBFlask.iss @@ -408,13 +408,9 @@ begin DbDetailsPage := CreateInputQueryPage(DbChoicePage.ID, 'Existing database', 'Connection details', - 'The database and application user must already exist. Your DBA creates ' + - 'them; the installer does not, so that it never needs administrative ' + - 'rights on your database server. If they need the exact statements:' + #13#10 + - ' CREATE DATABASE shopdb_flask CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;' + #13#10 + - ' CREATE USER ''shopdb''@''%'' IDENTIFIED BY '''';' + #13#10 + - ' GRANT ALL PRIVILEGES ON shopdb_flask.* TO ''shopdb''@''%'';' + #13#10 + - 'The utf8mb4 charset matters - the default on older servers is latin1.'); + 'The database and application user must already exist - the installer does ' + + 'not create them, so it never needs administrative rights on your database ' + + 'server. The exact SQL to give your DBA is in the INSTALL-WINDOWS guide.'); DbDetailsPage.Add('Host:', False); DbDetailsPage.Add('Port:', False); DbDetailsPage.Add('Database:', False); diff --git a/docs/INSTALL-WINDOWS.md b/docs/INSTALL-WINDOWS.md index 23d28a5..e9c7423 100644 --- a/docs/INSTALL-WINDOWS.md +++ b/docs/INSTALL-WINDOWS.md @@ -45,6 +45,21 @@ Two options. Pick before you start, because they ask different questions. If you are unsure: if nobody has given you database credentials, you want the bundled option. +### SQL for your DBA (existing-MySQL option only) + +The installer does not create the database or the user - it never needs +administrative rights on your database server. Ask your DBA to run: + +```sql +CREATE DATABASE shopdb_flask CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +CREATE USER 'shopdb'@'%' IDENTIFIED BY ''; +GRANT ALL PRIVILEGES ON shopdb_flask.* TO 'shopdb'@'%'; +FLUSH PRIVILEGES; +``` + +The `utf8mb4` charset matters - the default on older servers is `latin1`, and a +latin1 database mangles any non-ASCII text you store. + --- ## Installing