Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

Mysql56 to Mysql8


ZumbaCafew

Question

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

Link to post

11 answers to this question

Recommended Posts

  • 0
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 post
  • 0
  • Administrator

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...)

 

  • Love 2

logo.pngmiaw-network.png
 

Link to post
  • 0
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 post
  • 0
  • Administrator

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.

  • Love 1

logo.pngmiaw-network.png
 

Link to post
  • 0

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 by IceShiva (see edit history)
Link to post
  • 0
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.

  • Love 2

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to post
  • 0

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.

 

  • Love 1
Link to post
  • 0

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 by ZumbaCafew (see edit history)
Link to post
  • 0
  • Administrator

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.

 

This must be done in all the files where these names are present. In my example, I preferred to wrap all the columns, I'm fine now!

 

Example:

snprintf(szQuery, sizeof(szQuery), "SELECT `id`, `window`+0, `pos`, `count`, `vnum`, `bind`, `socket0`, `socket1`, `socket2`, `attrtype0`, `attrvalue0`, `attrtype1`, `attrvalue1`, `attrtype2`, `attrvalue2`, `attrtype3`, `attrvalue3`, `attrtype4`, `attrvalue4`, `attrtype5`, `attrvalue5`, `attrtype6`, `attrvalue6`, `applytype0`, `applyvalue0`, `applytype1`, `applyvalue1`, `applytype2`, `applyvalue2`, `applytype3`, `applyvalue3`, `applytype4`, `applyvalue4`, `applytype5`, `applyvalue5`, `applytype6`, `applyvalue6`, `applytype7`, `applyvalue7` FROM item WHERE `owner_id` = %d AND `window` = '%s'", pi->account_id, pi->ip[0] == 0 ? "SAFEBOX" : "MALL");

 

-----------------------

 

To simply imitate 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:

DBManager::instance().ReturnQuery(QID_AUTH_LOGIN, dwKey, p,
	"SELECT UPPER(CONCAT('*', SHA1(UNHEX(SHA1('%s'))))), `password`, `securitycode`, `social_id`, `id`, `status`, availDt - NOW() > 0,"
	"UNIX_TIMESTAMP(silver_expire),"
	"UNIX_TIMESTAMP(gold_expire),"
	"UNIX_TIMESTAMP(safebox_expire),"
	"UNIX_TIMESTAMP(autoloot_expire),"
	"UNIX_TIMESTAMP(fish_mind_expire),"
	"UNIX_TIMESTAMP(marriage_fast_expire),"
	"UNIX_TIMESTAMP(money_drop_rate_expire),"
	"UNIX_TIMESTAMP(create_time)"
	" FROM `account` WHERE `login` = '%s'",
szPasswd, szLogin);

 

logo.pngmiaw-network.png
 

Link to post
  • 0

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 by ZumbaCafew (see edit history)
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.