# UE4 Connect to MySql

**URL:** <https://forums.unrealengine.com/t/ue4-connect-to-mysql/428090>\
**Category:** C++\
**Tags:** unreal-engine, CPP, question\
**Created:** [June 25, 2018, 3:31pm UTC](https://forums.unrealengine.com/t/ue4-connect-to-mysql/428090 "2018-06-25T15:31:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HuangMM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HuangMM](https://forums.unrealengine.com/u/HuangMM)\
**Post date:** [June 25, 2018, 3:31pm UTC](https://forums.unrealengine.com/t/ue4-connect-to-mysql/428090/1 "2018-06-25T15:31:10Z")

</div>

Unfortunately , I got a problem when I try to Connect to MySql , VS error list like this:

 ![245364-qq图片20180625232511.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/e/35e2b5f8973a357b804e8cc45af011d65d795ab2.png)

][1]

It shows something is wrong about “FileReference”, but I know little about it.What should i do???

---

<div class="post-metadata">

**Author:** ![DarthPJB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarthPJB](https://forums.unrealengine.com/u/DarthPJB)\
**Post date:** [June 26, 2018, 12:12pm UTC](https://forums.unrealengine.com/t/ue4-connect-to-mysql/428090/2 "2018-06-26T12:12:56Z")

</div>

May I ask, why are you attempting to use an SQL database inside the build-process of Unreal?  
This doesn’t seem safe or appropriate.

---

<div class="post-metadata">

**Author:** ![HuangMM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HuangMM](https://forums.unrealengine.com/u/HuangMM)\
**Post date:** [June 27, 2018, 6:42am UTC](https://forums.unrealengine.com/t/ue4-connect-to-mysql/428090/3 "2018-06-27T06:42:00Z")

</div>

Hi，thank you for your remind . I just try to learn about DataBase and how to use database in UE4. Actually I know little about database.

---

<div class="post-metadata">

**Author:** ![DarthPJB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarthPJB](https://forums.unrealengine.com/u/DarthPJB)\
**Post date:** [June 27, 2018, 7:01am UTC](https://forums.unrealengine.com/t/ue4-connect-to-mysql/428090/4 "2018-06-27T07:01:07Z")

</div>

I understand, you will most likely want to use database in CPP files only.  
I Highly Recommend the [SQLlite3](https://www.sqlite.org/download.html) library for database use - while it is not MySQL it is very simple to use.

---

<div class="post-metadata">

**Author:** ![HuangMM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HuangMM](https://forums.unrealengine.com/u/HuangMM)\
**Post date:** [July 2, 2018, 1:27pm UTC](https://forums.unrealengine.com/t/ue4-connect-to-mysql/428090/5 "2018-07-02T13:27:40Z")

</div>

OK. e…busy recently. Thank you so much. I will try it.
