I’ve just finished setting this up (and struggling) with UE5.
Environment:
- //UE5/Release-5.2 @25384739
- Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.3.5
- Database server:
** Microsoft Windows Server 2022 Standard (10.0.17763 Build 17763)
** MySQL Community Server - GPL (8.0.16) - Web server:
** Microsoft Windows Server 2022 Standard - 10.0.20348 Build 20348
** IIS 10.0.20348.1
These are the main gotchas I ran into:
-
The MySQL version should match the version of the MySql.Data DLL exactly.
-
The Unreal docs say ‘if you enable the
ONLY_FULL_GROUP_BY
function, you may run into errors while running the MySQL script’, but I ran into these issues with a fresh MySQL installation. So, best to run the provided command anyway. -
In the Unreal docs, there is a typo in the MySQL command: ‘SELECT_REPLACE’ should be ‘SELECT REPLACE’.
-
This command needs to be run in the MySQL Client, not as a query in Workbench.
-
The MySQL service account requires sufficient access rights (just give it the Database Admin role to begin with and replace with specific schema rights once the database has been created - I checked SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, REFERENCES, INDEX, CREATE VIEW, and everything seems to be working still).
-
.NET Extensibility 4.8 and ASP.NET 4.8 should be installed via Add Roles & Features (installing them manually does not appear to work).
-
The application pool requires sufficient permissions (see Cobryis’s reply for more details).
-
NotForLicensees\Web.config should be excluded from the .csproj (just right-click and remove in VS)
-
In Web.Release.config and Web.Debug.config, the connection string is in SQL Server format. Make sure you replace the entire connection string with a MySQL format string (as provided in the docs) (assuming you’re using MySQL).
-
The name of the connection string element is ‘MyDB’, when it should be ‘ConnectionString’. This appears to be a bug.
-
When publishing, the user name should be fully qualified with the domain name i.e. <domain_name>\<user_name>
-
Validating the connection will fail during the publishing configuration setup, due to an empty destination URL, but will succeed once setup has completed. So create the publishing profile first, then edit the settings, and validate the connection.
-
If using Failed Request Tracing (to debug a 404), this needs to be installed via Add Roles & Features, and enabled on both the site and the server (this didn’t actually help me that much - the more specific error was just “The system cannot find the path specified” - and the issue was actually a missing asp.net dependency).
Hopefully, someone finds this useful and doesn’t have to suffer the same pain I went through.