# Database C++

**URL:** <https://forums.unrealengine.com/t/database-c/381300>\
**Category:** C++\
**Tags:** error, database, unreal-engine, CPP, question\
**Created:** [January 9, 2017, 2:50am UTC](https://forums.unrealengine.com/t/database-c/381300 "2017-01-09T02:50:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![NODARYN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NODARYN](https://forums.unrealengine.com/u/NODARYN)\
**Post date:** [January 9, 2017, 2:50am UTC](https://forums.unrealengine.com/t/database-c/381300/1 "2017-01-09T02:50:57Z")

</div>

Please tell me how to connect to the database server via C ++? I tried to MySQL, but I constantly crawl errors due to the fact that ConnectorC ++ for MySQL compiled on VS2010, and I’m using VS2017. Can I use SQLite for MMO project?

---

<div class="post-metadata">

**Author:** ![Dartanlla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dartanlla/32/724052_2.png) [@Dartanlla](https://forums.unrealengine.com/u/Dartanlla)\
**Post date:** [January 9, 2017, 3:02am UTC](https://forums.unrealengine.com/t/database-c/381300/2 "2017-01-09T03:02:09Z")

</div>

Yes, you can use any database you want with UE4, but you have to use unmanaged C++ libraries to access the database.

Since I have been working on connecting UE4 to a backend database for the past 2 years, I will let you know some of what has worked for me and what hasn’t.

So I started out like you and tried to directly connect Microsoft SQL to my dedicated UE4 server so I could build an MMO. I got it all working, but quickly realized that it doesn’t scale well and was fairly ugly and hard to manage. So then I built a brand new database system that sits behind a web API and is accessed from UE4 using JSON calls. This is working much better now. It also allows me to easily scale up to dozens of servers and create a world of any size I want that can accommodate thousands of players.

The JSON server is built with ASP .NET / MVC 5. I originally used the VaREST plugin to connect to my JSON server, but now I just use direct HTTP calls.

If you have any specific questions, let me know.

---

<div class="post-metadata">

**Author:** ![NODARYN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NODARYN](https://forums.unrealengine.com/u/NODARYN)\
**Post date:** [January 9, 2017, 4:39am UTC](https://forums.unrealengine.com/t/database-c/381300/3 "2017-01-09T04:39:59Z")

</div>

Well, thank you very much for your help. I would like to know whether it is possible to build a MMO using a SQLite database? Is it possible to find a hosting with the ability to install SQLite?

---

<div class="post-metadata">

**Author:** ![Dartanlla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dartanlla/32/724052_2.png) [@Dartanlla](https://forums.unrealengine.com/u/Dartanlla)\
**Post date:** [January 9, 2017, 5:00am UTC](https://forums.unrealengine.com/t/database-c/381300/4 "2017-01-09T05:00:31Z")

</div>

I’ve done it, so it is definitely possible. It is a lot of work though. I spent the last 6 months building my system. For development purposes you can just run SQLite directly on your PC. When you need to do more complicated testing you can use cheap virtual hosts. Microsoft SQL Express is free, so I personally prefer it over SQLite.

---

<div class="post-metadata">

**Author:** ![NODARYN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NODARYN](https://forums.unrealengine.com/u/NODARYN)\
**Post date:** [January 9, 2017, 5:34am UTC](https://forums.unrealengine.com/t/database-c/381300/5 "2017-01-09T05:34:00Z")

</div>

Well, thanks for the help. Sorry for my English, I use Google translator, I’m from Russia 🙂 As far as I understand to use the JSON, neobhodibo work with PHP? I do not know much the whole system, you will forgive me … I would like to work directly, using only the features of C ++.

---

<div class="post-metadata">

**Author:** ![theonecalledtom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@theonecalledtom](https://forums.unrealengine.com/u/theonecalledtom)\
**Post date:** [January 9, 2017, 5:55am UTC](https://forums.unrealengine.com/t/database-c/381300/6 "2017-01-09T05:55:26Z")

</div>

I’ve spent the last year working with AWS DynamoDB from within Unreal. Similar HTTP request with Json data approach.

The header signing process took me a while. If I were to start from scratch I’d take a much harder look at integrating a library to do it (think that the open source lib would be where I’d start looking).

No idea how the AW services map to your problem, but they definitely scale well!

---

<div class="post-metadata">

**Author:** ![NODARYN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NODARYN](https://forums.unrealengine.com/u/NODARYN)\
**Post date:** [January 10, 2017, 1:55am UTC](https://forums.unrealengine.com/t/database-c/381300/7 "2017-01-10T01:55:16Z")

</div>

Sorry for these stupid questions, I am a beginner programmer: how to get a JSON string from a site using C ++? Do I need to do to use the sockets?

---

<div class="post-metadata">

**Author:** ![Dartanlla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dartanlla/32/724052_2.png) [@Dartanlla](https://forums.unrealengine.com/u/Dartanlla)\
**Post date:** [January 10, 2017, 1:56am UTC](https://forums.unrealengine.com/t/database-c/381300/8 "2017-01-10T01:56:23Z")

</div>

This is what I am using:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![NODARYN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NODARYN](https://forums.unrealengine.com/u/NODARYN)\
**Post date:** [January 10, 2017, 6:28am UTC](https://forums.unrealengine.com/t/database-c/381300/9 "2017-01-10T06:28:09Z")

</div>

Thank you so much!

---

<div class="post-metadata">

**Author:** ![YeHaike](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YeHaike](https://forums.unrealengine.com/u/YeHaike)\
**Post date:** [April 27, 2018, 1:53am UTC](https://forums.unrealengine.com/t/database-c/381300/10 "2018-04-27T01:53:48Z")

</div>

Hope this plugin can help you.

[HiSQLite3( SQLite3 For UE4)](https://www.unrealengine.com/marketplace/hisqlite3-sqlite3-for-ue4)
