Jump to content
TrinityCore

Database auto updates, separate MySQL host


jududdar
 Share

Recommended Posts

Here's a bit of an odd question regarding database auto-updates:

I host my MySQL database on a separate server as I got tired of having multiple VMs with each having their own local MySQL install.  This has been working out great as I host a couple of 3.3.5a servers and a 6.x server along with a few different web servers.  Is there any way possible to specify a database host for the auto updater?  I don't have a problem with applying the updates manually, but in the past it was pretty nice to git pull > recompile > launch program with updates auto applying.

If this doesn't exist, I'm not sure it would receive enough use to merit any development work, but if it does exist, I'd love to know about it!

 

Thanks in advance.

Link to comment
Share on other sites

Alright, didn't work this time.  Here is the console output:

 

Updating Auth database...
>> Applying update "2015_07_02_00_auth.sql" 'E5EE384'...
ERROR 1049 (42000): Unknown database 'WoD_auth'
Applying of file '/home/<username>/TrinityCore/sql/updates/auth/2015_07_02_00_auth.sql' to database 'WoD_auth' failed! If you are an user pull the latest revision from the repository. If you are a developer fix your sql query.
Could not update the Login database, see log for details.

MySQL server is installed on the machine, but the service is stopped (I assume it has to be there to compile the server properly?).  I have to start the service not to get a socket error when I want to try the updates.  Here's the error without server started:

Updating Auth database...
>> Applying update "2015_07_02_00_auth.sql" 'E5EE384'...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Applying of file '/home/<username>/TrinityCore/sql/updates/auth/2015_07_02_00_auth.sql' to database 'WoD_auth' failed! If you are an user pull the latest revision from the repository. If you are a developer fix your sql query.
Could not update the Login database, see log for details.

I see in the code where it looks like this should work, and an old thread back in April where the commit got pushed to fix this very thing - I just can't make it work.  The string in the worldserver.conf is as follows:  "192.168.0.30;3306;<username>;<pass>;WoD_auth"

If I go on my server and do a "mysql -u <username> -p<pass> -h 192.168.0.30" it connects up without a hitch.

 

I can do the updates manually, it was just nice not having to! :)

Edited by jududdar
Link to comment
Share on other sites

My assumption all along is that I am just connecting via IP, but when the MySQL server isn't running on the local machine, I do get a sockets error?  This is where it doesn't make sense in my head - I'm not 100% positive that in doing the update query, the updater is even connecting to the remote MySQL server.

I did a bit of research on sockets as I've never dealt with them before, but none of the nomenclature I could feed into the connection string got me any further.  I'll describe my setup below if it will help any:

Trinity 6.x server = Debian 8.0 x64 (192.168.0.62)

Trinity 3.3.5a server = Debian 8.0 x64 (192.168.0.35)

MySQL server = FreeBSD 10.1-RELEASE-p10 x64 (192.168.0.30)

All three are running on an ESXi 5.5 host with networks on the same subnet (not doing any weird VLAN stuff, all default), both Debian boxes can authenticate from the MySQL cli fine to the FreeBSD database host.  I have a prefix for each required Trinity table in the DB corresponding to the version I'm running (i.e. - WoD_auth/characters/hotfixes/world, WotLK_auth/characters/hotfixes/world)

My connection string in worldserver.,conf is:  "192.168.0.30;3306;root;<password>;WoD_auth"

I've tried weird things that probably actually don't make any sense such as "192.168.0.30:/tmp/mysql.sock;3306;root;<password>;WoD_auth" and

"192.168.0.30;3306;root;<password>;192.168.0.30\WoD_auth"  I've dreamed those up following long posts on stackexchange, but if I'm honest I have no clue how to properly deal with a socket.

 

I'm open to any and all suggestions - the 6.x one is merely just an initial test box, so I can break it and blow it away as many times as needed!

 

Link to comment
Share on other sites

Theoretically there is no reason why it shouldn't work if you host the mysql server on a different machine.

 

Could you give it a try and revert the following commits locally according to your branch: https://github.com/TrinityCore/TrinityCore/commit/c1bd3282f8149890003bb353186131afe4708172 https://github.com/TrinityCore/TrinityCore/commit/fd660d725d62f56ab20e5bd170dc2614e202d050

Edited by Naios
Link to comment
Share on other sites

Removed all of the additions from that commit and recompiled, same issue.  I'm probably hung up on the wrong thing here, but when I have the local mysql server running, it appears to be attempting to connect to the local instance - when I do not have it running, I get the socket error.  It's my assumption based on what little bit of the code I can understand that unless I am throwing the connection string like this:

".;/tmp/mysql.sock;root;password;WoD_auth"

The server will attempt to connect via TCP instead of via sockets - yet the error is telling me it can't find the socket.

 

Banging my head on the wall on this one, not sure where to go from here... maybe back to a setup I understand, hah!

Link to comment
Share on other sites

Minor update:  I went into /etc/mysql/my.cnf and told the client to only use TCP as a test.  The error I get with that is

>> Applying update "2015_07_02_00_auth.sql" 'E5EE384'...
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (111)

Same error I get if I just run "mysql" with no arguments from the terminal.  I know 111 is connection refused, but there's no mysql server running, so I guess not existing can be a method of refusal.

Link to comment
Share on other sites

Tried that, takes me back to the old errors... trying to connect to localhost again.  I know with git, it's highly unlikely that I have a botched install, but since I've already got the dbc/maps/vmaps/mmaps, I may just try to rebuild it from scratch to see if I've messed anything up.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Madbryan
      Hi,
      I've follow the explanation to make a server with the mmaster branch.
      The authserver and worldserver launch without error.
      I've created an account with the command bnetaccount create
      But when i try to identificate on wow, it says that the login or password is invalid.
      How could vérify that password are encrypted in the right way and decrypt in the good way too ?
       
      Thanks in advance and for all your good work.
       
      Example of salt et verifier that appear in my database auth :
      Salt : ҕ��E��O���4��`˷����NV�:
      Verifier : � ���1ri͐������IDmm-�����v
       
      My table are in utf8_general_ci for auth, world and characters table and utf8mb4_unicode_ci for hotfixes
      MySQL57
      MySQL Workbench 8
      Visual Studio 2019
      Git v2.30.0

    • By DagothHertil
      Hello everyone. I have a small question about how can I access the spell ID`s used by creatures? In world database in creature_template table there is spell1, spell2, ... spell8 values wich correspond to spells wich I will be able to use when this creature is under Mind Control (as stated in wiki), but these values are set for creatuers up to level ~60 and for creatures from 70-80 none creatures have their spell1 .. spell8 set to any value. So my question is essentialy is where can I obtain the spell ID`s used by cretures? Obviously the creatures in 70-80 range have spell and they use them, but I dont see any values in world database and may be these spell lists come from dbc or something? I would realy appreciate any help 
    • By Lenny4
      When I log in to the game I have this message "Welcome to a Trinity Core Server".
      Where is the table to change this message ?
      Thank you
    • By gldssgames
      Hi, I am having problems with auto update (I find it very confusing to update each update manually), it seems that it only works in version deployed and not as autonomous.
      I run mysql via Command Prompt has worked for me for a long time in projects ... I think it may be ... because I point the configuration file.
      This sentence caught my attention: "failed! If you are a user" (phrase shown in the worldserver log) which I think may have to have permission
      The mysql configuration file, Server log file and the bat pitcher in the form of text is attached, if no one accidentally runs.
      The mysql configuration file and the bat mysql run in the form of text is attached, so no one accidentally runs.
      I will continue to seek a solution, if I find I put here for others with the same problem.
      Thank you for all!

      Since I do not speak English, I translated using google, I'm sorry for that.
      my.ini
      mysql.bat.txt
      Server.log
    • By Yehonal
      Hi!
      Few weeks ago has been created a project: www.wowgaming.org
      It's a WoW resource pool (Db search, wiki, addons etc) subdivided by expansion that currently support wotlk 3.3.5a
      All information inside are stored  with original data from that specific game version.
      It's totally Free and Open Source alternative to (dead?) OpenWoW site!
      Please read this page to understand why and how we can do it.
      This project can be helpful for:
      - Wiki and Database search engine for educational Open Source application server projects, such as TrinityCore
      - Keeping an historical archive of World of Warcraft original data
      - Discussing and Blogging about newest and oldest WoW Facts 

      wotlk portal (index of all subsite below): http://www.wowgaming.org/wotlk.html
      database: https://wowgaming.altervista.org/aowow/
      addon list: http://www.wowgaming.org/addons-335a-collection/
      wiki: https://wowgaming.altervista.org/wp/wotlk-home/
       
      Our repositories: https://github.com/wowgame
       
      If you want to help us or maintaining another version using our free tools
      Please, Contact us on Discord
×
×
  • Create New...