ZumbaCafew 1 Posted October 11, 2020 Share Posted October 11, 2020 Hello, I hope that you and your loved ones are doing well in this complicated health crisis as well. I wanted to know if it was possible to run my Metin2 server which is currently running Mysql56 part Mysql8? Thanks in advance 1 Link to comment Share on other sites More sharing options...
Shahin 223 Posted October 11, 2020 Share Posted October 11, 2020 1 hour ago, ZumbaCafew said: Hello, I hope that you and your loved ones are doing well in this complicated health crisis as well. I wanted to know if it was possible to run my Metin2 server which is currently running Mysql56 part Mysql8? Thanks in advance I have tried running in mysql8. No chance what so ever. I have tried for more than a month and with other's help and still nothing. You can try but it is a dead end. Go with freebsd 12.1, gcc8, vs2019 and stay with mysql 5.6. There is no harm. Change your mysql ports from 3306 to something else and you're good to go. Have a good night. Link to comment Share on other sites More sharing options...
Management Solution AZICKO 7349 Posted October 11, 2020 Management Solution Share Posted October 11, 2020 MySQL 8.0 works: You must compile your "db" and your "game" with the MySQL 8.0 includes. Change the password encryption method or imitate the PASSWORD() function (it has been removed) Some columns must be wrapped (in the cpp file) ("window", "rank" for example...) 1 1 3 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
Shahin 223 Posted October 11, 2020 Share Posted October 11, 2020 2 minutes ago, ASIKOO said: MySQL 8.0 works: You must compile your "db" and your "game" with the MySQL 8.0 includes. Change the password encryption method or imitate the PASSWORD() function (it has been removed) Some columns must be wrapped (in the cpp file) ("window", "rank" for example...) My question is: Is it worth it? Link to comment Share on other sites More sharing options...
Management AZICKO 7349 Posted October 11, 2020 Management Share Posted October 11, 2020 I think we can have a small improvement (related to MySQL 8), for Metin2 it must be little? Personally, I upgraded my server to MySQL 8, to be up to date. 1 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
IceShiva 150 Posted October 11, 2020 Share Posted October 11, 2020 (edited) Also since mysql 5.6 you cannot use 0000-00-00 00:00:00 as default date If you want use InnoDB as default storage engine at all databases and tables you need to rewrite libsql connector to something that suport transactions and of course rest of code due data in innodb can have few states such as commited and uncommited. Of course is worth. Edited October 11, 2020 by IceShiva Link to comment Share on other sites More sharing options...
Vanilla 1455 Posted October 11, 2020 Share Posted October 11, 2020 1 hour ago, Shahin said: I have tried running in mysql8. No chance what so ever. I have tried for more than a month and with other's help and still nothing. You can try but it is a dead end. Go with freebsd 12.1, gcc8, vs2019 and stay with mysql 5.6. There is no harm. Change your mysql ports from 3306 to something else and you're good to go. Have a good night. drop me a private message I'll help you with the issues gladly. Mysql 8 is possible. It's not too much of a hassle to upgrade to it. 2 We are the tortured. We're not your friends. As long as we're not visible. We are unfixable. Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2514 Posted October 12, 2020 Forum Moderator Share Posted October 12, 2020 I've been running my server very smoothly with MySQL8 for a long time already and as Asikoo said, it doesn't requiere this much. You just need to wrap `window` like I shown, because it became "protected" in MySQL8. He explained the rest of the guide accurately. 1 Gurgarath coming soon Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted October 12, 2020 Author Share Posted October 12, 2020 Hello, Thank you all for answering, but being a beginner, could someone please explain to me step by step how to do it? Unless a tutorial already exists? Thank you in advance Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted October 15, 2020 Author Share Posted October 15, 2020 (edited) Hello everyone, Would it be possible to know what I need to modify in the db sources to use mysql80? Just an example if you like so I understand and change everything else on my side Also, where do I find the mysql8 includes and then put them or in my sources? I was using mysql56 and when I launch the server I have this : # mysql_real_connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client Thank you Edited October 15, 2020 by ZumbaCafew Link to comment Share on other sites More sharing options...
Management AZICKO 7349 Posted October 18, 2020 Management Share Posted October 18, 2020 File: ClientManager.cpp Description: It's necessary to wrap the names of the columns which are protected since MySQL 8.0, the two names that I know: window, rank. In my example, I wrapped all columns. Example: This is the hidden content, please Sign In or Sign Up To """ recreate """ the PASSWORD() function, it was deleted... File: input_auth.cpp Description: You have to replace part of the code by: UPPER(CONCAT('*', SHA1(UNHEX(SHA1('%s'))))). Example: This is the hidden content, please Sign In or Sign Up 123 1 1 1 1 32 56 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted October 24, 2020 Author Share Posted October 24, 2020 (edited) Hello, after changing the includes path to "../../mysql_8_0_20", I get an error when compiling the db and game source: linking ../db_r40414_64.... ld: error: unable to find library -lmysqlclient clang-9: error: linker command failed with exit code 1 (use -v to see invocation) gmake: *** [Makefile:56: ../db_r40414_64] Error 1 linking ../game_r44214_64.... ld: error: unable to find library -lmysqlclient clang-9: error: linker command failed with exit code 1 (use -v to see invocation) gmake: *** [Makefile:127: ../game_r44214_64] Error 1 Does anyone know how to do this? thank you Edited October 25, 2020 by ZumbaCafew Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 3, 2020 Author Share Posted November 3, 2020 (edited) Hello, would it be possible to have some help please? Thank you Makefile db: CC = clang++90 INCDIR = LIBDIR = BINDIR = .. OBJDIR = .obj PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1) GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1) BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1) VERSION = $(shell cat ../REVISION) REVISION = $(shell echo $$(($(VERSION)+1))) $(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi) CFLAGS = -m32 -w -g -Wall -O2 -pipe -fno-rtti -fno-exceptions -Wno-long-long -pthread -D_THREAD_SAFE # MySQL # INCDIR += -I/usr/local/include/mysql # LIBDIR += -L/usr/local/lib/mysql ifeq ($(BSD_VERSION), 7) INCDIR += -I../../libmysql/7.x-5.1.35 LIBDIR += -L../../libmysql/7.x-5.1.35 else INCDIR += -I../../libmysql/mysql_8_0_20 LIBDIR += -L../../libmysql/mysql_8_0_20 endif # Project Libraries INCDIR += -I../../../Extern/include LIBDIR += -I../../../Extern/lib INCDIR += -I/usr/local/include LIBDIR += -I/usr/local/lib LIBDIR += -L../../libthecore/lib -L../../libsql -L../../libpoly -L../../libgame/lib LIBS = -lthecore -lmysqlclient -lsql -lpoly -lgame -lm -lz TARGET = $(BINDIR)/db_r$(REVISION)_$(PLATFORM) SRCS = Config.cpp NetBase.cpp Peer.cpp PeerBase.cpp Main.cpp Lock.cpp DBManager.cpp \ Cache.cpp LoginData.cpp ClientManager.cpp ClientManagerPlayer.cpp ClientManagerLogin.cpp \ ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp \ PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp \ Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp \ ProtoReader.cpp CsvReader.cpp OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o) default: $(TARGET) $(TARGET): $(OBJS) @echo linking $(TARGET).... @$(CC) $(FLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $(TARGET) @expr $(REVISION) > ../REVISION $(OBJDIR)/%.o: %.cpp @echo compiling $< @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -D__VERSION__=\"$(REVISION)\" -c $< -o $@ @echo compiling $< $(OBJDIR): @mkdir $(OBJDIR) clean: @rm -f $(OBJS) $(BINDIR)/db_r* dep: @touch Depend makedepend -f Depend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(SRCS) 2> /dev/null sinclude Depend Makefile game: MAKE = gmake CC = clang++90 INCDIR = LIBDIR = BINDIR = .. OBJDIR = .obj PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1) GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1) BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1) VERSION = $(shell cat ../REVISION) REVISION = $(shell echo $$(($(VERSION)+1))) $(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi) # Standard Setting LIBS = -pthread -lm -lmd CFLAGS = -m32 -g -Wall -w -O2 -pipe -fexceptions -D_THREAD_SAFE -DNDEBUG # Removed -fno-rtti CFLAGS += -fstack-protector-all -fno-strict-aliasing # DevIL INCDIR += -I../../libdevil LIBDIR += -L../../libdevil LIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg # MySQL # INCDIR += -I/usr/local/include/mysql # LIBDIR += -L/usr/local/lib/mysql ifeq ($(BSD_VERSION), 7) INCDIR += -I../../libmysql/7.x-5.1.35 LIBDIR += -L../../libmysql/7.x-5.1.35 else INCDIR += -I../../libmysql/mysql_8_0_20 LIBDIR += -L../../libmysql/mysql_8_0_20 endif LIBS += -lmysqlclient -lz # Miscellaneous external libraries INCDIR += -I../../../Extern/include LIBDIR += -L../../../Extern/lib LIBS += -lcryptopp # LIBS += -lgtest INCDIR += -I/usr/local/include LIBDIR += -L/usr/local/lib # OpenSSL # INCDIR += -I/usr/include # LIBS += -lssl # LIBS += /usr/lib/libssl.a # Project Library INCDIR += -I../../liblua/include INCDIR += -I../../libserverkey LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib -L../../libserverkey LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame -lserverkey TARGET = $(BINDIR)/game_r$(REVISION)_$(PLATFORM) CFILE = minilzo.c CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\ arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\ char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_cards.cpp char_manager.cpp\ char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp char_gem.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\ cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\ desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\ entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\ guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\ input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp ip_ban.cpp\ item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\ locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\ messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\ party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\ questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\ questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\ questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\ questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\ questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\ refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\ skill.cpp start_position.cpp target.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\ wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\ BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\ skill_power.cpp affect.cpp SpeedServer.cpp questlua_speedserver.cpp\ auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\ buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\ group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\ shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp offline_shop.cpp offlineshop_manager.cpp MeleyLair.cpp questlua_meleylair.cpp\ TempleOchao.cpp questlua_templeochao.cpp\ GrowthPetSystem.cpp questlua_growthpet.cpp\ char_mailbox.cpp\ minigame.cpp minigame_catch_king.cpp CsvReader.cpp\ battle_pass.cpp switchbot.cpp questlua_pvp.cpp COBJS = $(CFILE:%.c=$(OBJDIR)/%.o) CPPOBJS = $(CPPFILE:%.cpp=$(OBJDIR)/%.o) MAINOBJ = $(OBJDIR)/main.o MAINCPP = main.cpp default: $(TARGET) $(OBJDIR)/minilzo.o: minilzo.c @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ @echo compiling $< $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -D__VERSION__="$(REVISION)" -c $< -o $@ @echo compiling $< $(OBJDIR)/%.o: %.cpp @echo compiling $< @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ limit_time: @echo update limit time @python update_limit_time.py $(TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ) @echo linking $(TARGET).... @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TARGET) @expr $(REVISION) > ../REVISION clean: @rm -f $(COBJS) $(CPPOBJS) @rm -f $(BINDIR)/game_r* $(BINDIR)/conv tag: ctags *.cpp *.h *.c dep: makedepend -f Depend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) 2> /dev/null > Depend sinclude Depend Edited November 3, 2020 by ZumbaCafew Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 8, 2020 Author Share Posted November 8, 2020 Hello, up please Thank you Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2427 Posted November 8, 2020 Developer Share Posted November 8, 2020 (edited) On 10/25/2020 at 1:57 AM, ZumbaCafew said: linking ../db_r40414_64.... ld: error: unable to find library -lmysqlclient clang-9: error: linker command failed with exit code 1 (use -v to see invocation) gmake: *** [Makefile:56: ../db_r40414_64] Error 1 Are you compiling on a i386 machine? or an amd64? Amd64 machines will install you the lib built in 64bit which are incompatible with your game and db executables (which you are building in 32bit). On 11/3/2020 at 10:54 PM, ZumbaCafew said: ifeq ($(BSD_VERSION), 7) INCDIR += -I../../libmysql/7.x-5.1.35 LIBDIR += -L../../libmysql/7.x-5.1.35 else INCDIR += -I../../libmysql/mysql_8_0_20 LIBDIR += -L../../libmysql/mysql_8_0_20 endif Here you changed the -I and -L paths you are adding to LIBDIR and INCDIR, but can u find the lib in the directory you moved to? Edited November 8, 2020 by Ikarus_ My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 8, 2020 Author Share Posted November 8, 2020 Hello, I have a machine under FreeBSD in x64 I don't have the lib-lmysqlclient Thank you Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2427 Posted November 8, 2020 Developer Share Posted November 8, 2020 10 minutes ago, ZumbaCafew said: I don't have the lib-lmysqlclient You should put it in your extern/lib. I don't think you will find it in your machine x64, you need the 32bit one. What version of freebsd are u using? pkg.freebsd.org may help you to find it easly My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 8, 2020 Author Share Posted November 8, 2020 I have this vdi: FreeBSD 11.3 x64.vdi In the mysql 7.x-5.1.35 folder I have the lib "libmysqlclient.a / libmysqlclient_r.a" but I want to switch to mysql_8_0_20. Where can I find the lib for this version? Thanks Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 8, 2020 Author Share Posted November 8, 2020 (edited) I solved the problem thanks to the lib in the mysql 7.x-5.1.35 folder, so I manage to compile, but how can I get the lib for mysql8? Thanks Edited November 8, 2020 by ZumbaCafew Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2427 Posted November 8, 2020 Developer Share Posted November 8, 2020 (edited) i ll send you my include and lib folders for mysql80, they are for freebsd 11.3 only (32 bit obv) give me a moment to make the zip 4 hours ago, ZumbaCafew said: I solved the problem thanks to the lib in the mysql 7.x-5.1.35 folder, so I manage to compile, but how can I get the lib for mysql8? You can't use a lib and an include which are from differents version of mysql... you will get runtime errors (segmentation fault) Edited November 8, 2020 by Ikarus_ My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 8, 2020 Author Share Posted November 8, 2020 All right, fine. Thank you very much for your help Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2427 Posted November 8, 2020 Developer Share Posted November 8, 2020 This is the hidden content, please Sign In or Sign Up 75 1 1 16 4 21 My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 8, 2020 Author Share Posted November 8, 2020 Thanks for sharing, where should I put this folder? Thank you Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2427 Posted November 8, 2020 Developer Share Posted November 8, 2020 (edited) 8 minutes ago, ZumbaCafew said: Thanks for sharing, where should I put this folder? Thank you I usually prefer to put the 3th part libraries on extern folder, but you can move it whenever you want. The important thing is to change the -I and -L directives with your directories. An example would be: #Mysql Dynamic LIBDIR += -L../../../extern/lib/mysql INCDIR += -I../../../extern/include/mysql LIBS += -lmysqlclient #Mysql Static INCDIR += -I../../../extern/include/mysql LIBS += ../../../extern/lib/mysql/libmysqlclient.a the first three lines are for a dynamic linking (it might prefer to link using libmysqlclient.so rather than libmysqlclient.a where both are available) the second two lines are for a static linking (where we are forcing it to use libmysqlclient.a) You can choice the way you prefer. Edited November 8, 2020 by Ikarus_ 1 My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
ZumbaCafew 1 Posted November 8, 2020 Author Share Posted November 8, 2020 (edited) All right, thank you I will try Edited November 8, 2020 by ZumbaCafew Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now