SQL / UE · 2024年6月19日 0

Blueprints MySQL Connector / UE | DTMysql plugin instructions Unreal Engine uses blueprints to connect to MySQL data for insert, delete, update, and select operations

This plug-in mainly supports connecting and operating MYSQL database in UE blueprint.

1. Database Connectivity 【 Connect MySql 】

Blueprints MySQL Connector / UE | DTMysql plugin instructions Unreal Engine uses blueprints to connect to MySQL data for insert, delete, update, and select operations

Enter:

Host: Database IP address

Port: Database open port

User: Database user name

Password: Database password

DBName: Specify the database name to connect to

Output:

Success: Returns whether the database connection is successful

Error No: Returns the error number if the connection fails, and returns 0 if the connection succeeds

Error Msg: Returns the error message if the connection fails


2. Operate the database【 Execute SQL 】

Blueprints MySQL Connector / UE | DTMysql plugin instructions Unreal Engine uses blueprints to connect to MySQL data for insert, delete, update, and select operations

Enter:

SQL: Executed SQL statements, including SELECT, DELETE, INSERT, UPDATE, and CALL. Basically all SQL statements are supported, and you can operate the database directly here.

Output:

Success: Returns whether the operation is executed successfully

Error No: Error number, returns 0 if successful

Error Msg: Returns error message if the operation fails

Rows: Number of rows of output results after execution

Result:Returns the database result set. If it is a CALL stored procedure or database function, it may return multiple result sets. In this case, you need to [Add Result] to add results based on the actual return.


3. 结果集分解

The result set returned by Result is an array of MAPs. An array is equal to a row of information, and the data of this row is stored in a MAP.

You can also use the built-in function of this plugin to convert the output result set to JSON.

4. Download link

MySQL Connector in Code Plugins – UE Marketplace (unrealengine.com)