unconomy/shop - mysql not connecting.

Discussion in 'Tutorials' started by herculas, Aug 29, 2016.

  1. herculas

    herculas N00b

    5
    0
    1
    ok so i got the plugins to work 50/50.
    In the game the commands such as /balance and /shop work. The problem is that i set the initial balance to 50 and the currency name to gold. its updated the name but it says my balance is 0.
    The other problem is that /shop add 17 100 (or any other item id) doesnt work, it says there was an error adding/changing military drums!
    It makes me believe the server and the database are not connected.
    I have followed a guide and set up MySQL and HeidiSQL.

    My server is being hosted by host havoc. I am not running my own server!

    <?xml version="1.0" encoding="utf-8"?>
    <UconomyConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <DatabaseAddress>localhost</DatabaseAddress>
    <DatabaseUsername>root</DatabaseUsername>
    <DatabasePassword>password</DatabasePassword>
    <DatabaseName>unturned</DatabaseName>
    <DatabaseTableName>uconomy</DatabaseTableName>
    <DatabasePort>3306</DatabasePort>
    <InitialBalance>50</InitialBalance>
    <MoneyName>Gold</MoneyName>
    </UconomyConfiguration>

    This is the uconomy.config - right now its set to localhost, I have tried multiple IPs including my web IP from whatsmyip.org and also my IPv4 adress from cmd. Both the IPs cause everyone that enters the server to disconnect, including me. right now i am using my IPv4 address to log into the heidiSQL database.

    Can anyone who is well versed in this subject point me towards the right direction please?!?!
    If you need anymore information let me know.
    Thanks!
     
  2. mindbdsm

    mindbdsm Rookie+

    145
    19
    68
    On your local PC?
    You need to set it so it's accessible by remote connection which you are trying to do from server that is not hosted same location as the sql itself. Also check firewall and add exception to that too. If it's your local PC it means your PC needs to stay on otherwise it won't work.

    I suggest using some online free sql database such as http://www.freesqldatabase.com/ or google cloud sql (this might not be free, not sure).
     
  3. herculas

    herculas N00b

    5
    0
    1
    the server is hosted by host havoc, the mysql is on my computer. when i was setting up mysql i ticked the boxes that said allow remote access and add to exemptions. but ill look into free sql databases, thanks
     
  4. mindbdsm

    mindbdsm Rookie+

    145
    19
    68
    Could be firewall or router then, also your IP is not static so even if you enable it on your PC you will have to change IP in cofing every 24 hours. Check those free sql, I think this will be easiest and best for you.
     
  5. Sprotni

    Sprotni N00b

    4
    0
    51
    _
     
    Last edited: Nov 2, 2016

Share This Page