Announcement

Collapse
No announcement yet.

connect mysql online with c++ on unreal enine

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    connect mysql online with c++ on unreal enine

    hi

    how i can use mysql online with c++ on unreal to make database for login user and other data , is there away to make that on unreal?

    Thanks for help

    #2
    this not job of unreal

    Originally posted by abdsf View Post
    hi

    how i can use mysql online with c++ on unreal to make database for login user and other data , is there away to make that on unreal?

    Thanks for help
    this is not job of unreal more job of a server based
    what i mean
    u need some kind network handler such http://www.raknet.net/ (best i seen)
    and use on him
    http://dev.mysql.com/doc/refman/5.7/...-cpp-info.html
    when u do action

    in simple answer no
    u need use dll for that

    Comment


      #3
      It's not a got practice to let your games client access the database directly. It's much better to make some web services on your server side and make the clients use those services.

      Comment


        #4
        Originally posted by fastwings View Post
        this is not job of unreal more job of a server based
        what i mean
        u need some kind network handler such http://www.raknet.net/ (best i seen)
        and use on him
        http://dev.mysql.com/doc/refman/5.7/...-cpp-info.html
        when u do action

        in simple answer no
        u need use dll for that
        Thank you for reply

        I think RakNet is best way for that and stable

        Comment


          #5
          Originally posted by siq View Post
          It's not a got practice to let your games client access the database directly. It's much better to make some web services on your server side and make the clients use those services.
          that way is difficult for me because I don't know php

          Comment


            #6
            Why in the heck would you use RakNet for something like that?

            Easiest way is to probably set it up to communicate via a web server, then you don't have to create nearly as much stuff. On the other hand you could link MySQL libraries to your project, and run from there. Direct connection to a remote database is usually not the norm, though. It's a lot easier to setup a web server that deals with it instead.

            Comment


              #7
              If your game connects to the account database directly, clients could steal your password and then change the query a bit and woop, they got all kinds of info that no client should ever have. Bad.

              The proper way to do this is to have the database on your web server, locked behind a php interface, which sanitizes the input and makes sure that the clients only do what they're supposed to do.

              Comment


                #8
                Originally posted by Zeblote View Post
                If your game connects to the account database directly, clients could steal your password and then change the query a bit and woop, they got all kinds of info that no client should ever have. Bad.
                You can actually set permissions database-side. So the client would actually be only able to querry commands you want him to querry.

                Comment


                  #9
                  Originally posted by Cube2222 View Post
                  You can actually set permissions database-side. So the client would actually be only able to querry commands you want him to querry.
                  Sure, but it doesn't negate the fact that use of direct DB connection is really bad idea
                  Making games with Unreal Engine https://ufna.dev
                  My plugins official channel: https://discord.gg/N92pzqJ

                  Comment


                    #10
                    Originally posted by Cube2222 View Post
                    You can actually set permissions database-side. So the client would actually be only able to querry commands you want him to querry.
                    But unless what you do are basically selecting data, it can get dangerous as you have to think of all the possible ways that that user might screw your data. And exposing your DB to the Internet with the credentials of at least one user is asking for trouble. A security privileges scalation bug in the database and you might be toast real fast. Putting a "neutral" communication layer between the game and the server side gives you more flexibility and you can hide the details of the DB, logic etc.

                    We've used ZeroMQ http://zeromq.org/ and the UE4 HTTP modules (FHttpModule and friends) successfully to communicate the game with MySQL/PostgreSQL databases and implementing the backend logic in whatever language you are comfortable with.

                    Moreover, flexibility in the the communication side allows you to more easily add things down the road like clustering, failover, modifying database versions/brands etc. Having a layer between the DB and the game facilitates all of that.

                    Comment


                      #11
                      How do you add ZeroMQ to the unreal project?

                      Comment


                        #12
                        Database should only be used by master server which is not necessarily built with UE
                        Hi!

                        Comment


                          #13
                          Yeah, learn from Super Meat Boy's mistake:

                          http://www.reddit.com/r/gaming/comme..._left_open_to/

                          Comment


                            #14
                            Man you nead use https://forums.unrealengine.com/showthread.php?6434 and somfing like denwer, create html and java script too connect and if coonect true event begin play or... and load save in BD propites you must see tutorial like unity connect too msql
                            Last edited by sashatankist; 09-14-2014, 03:08 PM.

                            Comment


                              #15
                              Please do not necrobump threads if you don't really need to.

                              Comment

                              Working...
                              X