BlugDeg

SOLUTION // Setting MYSQL to strict_mode

15 posts in this topic

Hey whatsupp together.
At first, i'm trying to help you, if it doesn't work. Tell me and i'm trying to find some solution!

Today i'm gone show you, how we can easy fix a MYSQL-Server bug. My bug was looking like this:
 

Spoiler

[20:04:58:695402 +02:00] [Thread 2412] extDB2: Database Type: MySQL
[20:04:58:741503 +02:00] [Thread 2412] extDB2: Database Session Pool Started
[20:04:58:746836 +02:00] [Thread 2412] extDB2: SQL_CUSTOM_V2: Loading Template Filename: C:\Arma3\A3Master\extDB\sql_custom_v2\exile.ini
[20:04:58:747097 +02:00] [Thread 2412] extDB2: SQL_CUSTOM_V2: Version 12 Detected, Latest Version 12 Available
[20:05:56:886654 +02:00] [Thread 2412] extDB2: SQL_CUSTOM_V2: Error StatementException: MySQL: [MySQL]: [Comment]: mysql_stmt_execute error    [mysql_stmt_error]: Field 'assigned_items' doesn't have a default value    [mysql_stmt_errno]: 1364    [mysql_stmt_sqlstate]: HY000    [statemnt]: INSERT INTO player SET account_uid = ?, name = ?

Sounds terrible i know. But it isn't. Here are my solutions.

It exist 2 Way's. Which you choose, i dont care.

Way 1
-For the first problem you need a Console for your Database like MYSQL Workbench.
If you opened. You need to go to your exile Databse with a doubleclick. If exile is open and you can see al your tables (if not, you need to setup your databse correctly).

-Next you go write a new SQL command with these button with the + in the Paper.
-*First you write

SELECT @@GLOBAL.sql_mode;

- And start the command with the lightning.

-it opens a formular with sql_mode: (and some Text),

-Next you write a new command with:

SET @@GLOBAL.sql_mode= '';

- And start it with the lightning

-You go to the step with the '*' back. And write the command with SELECT  again. If the modes are gone and there is just sql_mode: ' '.

-Now we gonne need to Set the strict mode.

SET @@GLOBAL.sql_mode= 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

- And start it with the lightning

-Now we go to make sure, it activate it. with the SELECT  command again (the step with the '*')

- If it looks like this: (on the Picture)
-you win. And it shoud work!

Way 2
- You need to aviable to see all folders. Then you go to the path C >>ProgramData >> MYSQL >> MYSQL Server 5.7 >> my.ini and minimze it!

- WIth win + R you, then you write ' services.msc '. You search MYSQL57, then you stop it with rightclick!

-You go back to the file we opened (my.ini). Search sql-mode:

-Edit the line to

sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

-you save it and close it.

-go back to the services.msc, and start the mysql again!
-You win, the server should work!

 

If it doesn't work. Let me know.
If it work. Let me know also.

//Guess BlugDeg
 

1.png

  • Like 2

Share this post


Link to post
Share on other sites

I did your tutorial above and it 

When I run SELECT @@GLOBAL.sql_mode I get this

'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
 

I am still stuck on requesting bambi creation timeout. Any ideas ? 

Share this post


Link to post
Share on other sites
Advertisement

What finally worked for me was setting the user permission on the .ini file itself. This allowed the change to save. At that point, you can either revert the permissions back or leave them. I went with reverting back since that's how I found it (kind-of-logic). Same steps followed, stop the server, make the change, save and restart the server. 

I've just recently discovered the mod and set up a server, so the tutorial works. Like a bonehead, I didn't do all the steps the first go around and had issues. Finally installed everything in order (regardless if previously installed) and Bob was my uncle. Well, I really do hav...never mind.

And the above works if you are the admin on your machine. If not, and not sure why you would not be, get with the 'admin' and move forward.

cheers

Share this post


Link to post
Share on other sites

it seems to be since I updated arma today. It was working fine last night. I am running mysql on debian not windows as well but it should not matter anyways. 

This is my extdb logs

 

[20:52:17:614210 --3:00] [Thread 3796] extDB2: SQL_CUSTOM_V2: Error StatementException: MySQL: [MySQL]: [Comment]: mysql_stmt_execute error    [mysql_stmt_error]: Cannot add or update a child row: a foreign key constraint fails (`exile`.`player`, CONSTRAINT `player_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE)    [mysql_stmt_errno]: 1452    [mysql_stmt_sqlstate]: 23000    [statemnt]: INSERT INTO player SET account_uid = ?, name = ?
[20:52:17:614461 --3:00] [Thread 3796] extDB2: SQL_CUSTOM_V2: Wiping Statements + Session
[20:52:17:614500 --3:00] [Thread 3796] extDB2: SQL_CUSTOM_V2: Error: UniqueID: 1 Input String: createPlayer:myplayid:mmyplayernamehere

Edited by Breau

Share this post


Link to post
Share on other sites

Anyone find the resolution to this? I have the same issue above extDB2 log and I have set my.ini

[13:51:15:141635 --4:00] [Thread 1644] extDB2: SQL_CUSTOM_V2: Error: UniqueID: 1 Input String: createPlayer:76561198000xxxxxx:playername

# Set the SQL mode to strict
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

I even tried # Set the SQL mode to strict
sql-mode=""

FYI My.ini location is C:\ProgramData\MySQL\MySQL Server 5.7\My.ini so if you cannot see the ProgramData folder you need to show hidden folders

Server startup parameters via batch file

@echo off

start "arma3" /HIGH "arma3server.exe" -mod=@Exile;Kart,Mark,Heli;@DonkeyPuncheD_Exile_Addon_Mod;@CBA_A3;@CUPUnits;@CUPVehicles;@CUPWeapons; -servermod=@asm;@ExileServer;@infiSTAR_Exile; -config=D:\server\@ExileServer\config.cfg -profiles=SC -cfg=D:\server\@ExileServer\basic.cfg -name=SC -bepath=D:\server\battleye -port=2302 -loadMissionToMemory -autoInit -malloc=tbbmalloc

@exit

Share this post


Link to post
Share on other sites

So I took off CBA and taskforce and it works. But it comes back again if the server is online for too long as well. So when I reboot the server it's fine after for a bit.

Share this post


Link to post
Share on other sites

I used the tutorial @S. , even with this tutorial remains error. :(

My log:

[12:15:05:119716 --2:00] [Thread 48344] extDB2: Database Type: MySQL
[12:15:05:228313 --2:00] [Thread 48344] extDB2: Database Session Pool Started
[12:15:05:251291 --2:00] [Thread 48344] extDB2: SQL_CUSTOM_V2: Loading Template Filename: D:\Arma\Server\@exileserver\extDB\sql_custom_v2\exile.ini
[12:15:05:251442 --2:00] [Thread 48344] extDB2: SQL_CUSTOM_V2: Version 12 Detected, Latest Version 12 Available
[12:17:19:466050 --2:00] [Thread 48344] extDB2: SQL_CUSTOM_V2: Error StatementException: MySQL: [MySQL]: [Comment]: mysql_stmt_execute error	[mysql_stmt_error]: Field 'assigned_items' doesn't have a default value	[mysql_stmt_errno]: 1364	[mysql_stmt_sqlstate]: HY000	[statemnt]: INSERT INTO player SET account_uid = ?, name = ?
[12:17:19:466202 --2:00] [Thread 48344] extDB2: SQL_CUSTOM_V2: Wiping Statements + Session
[12:17:19:466230 --2:00] [Thread 48344] extDB2: SQL_CUSTOM_V2: Error: UniqueID: 1 Input String: createPlayer:*****************:marcelotk
[12:18:09:664437 --2:00] [Thread 48344] extDB2: Stopping ...

 

Edited by marcelotk
add log

Share this post


Link to post
Share on other sites

@marcelotk. Sorry you had not had luck with the guide.

I have installed over 200+ servers and can confidently say the guide works 100%. The issue almost always is mods or some configuration that break the servers.

Your logs are pointing the configuration of the exile database (schema). I would suggest redoing the SQL installation and database creation

 

Regards

 

Edited by S.
  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, S. said:

@marcelotk. Sorry you had not had luck with the guide.

I have installed over 200+ servers and can confidently say the guide works 100%. The issue almost always is mods or some configuration that break the servers.

Your logs are pointing the configuration of the exile database (schema). I would suggest redoing the SQL installation and database creation

 

Regards

 

I have reinstalled all, and now is working, ty!

Share this post


Link to post
Share on other sites

Sharing my experience:

It seems that the first method in the OP is not persistent or at least in my setup it is not. If you decide to use method 1 you may have to run this each time.

In method 2 I use a wamp server so my mysqld is an executable and not a service. I could not get the second method to take effect even with restarting the entire list of services in wamp.

This is all on a brand new install of everything and the only method I could get to work was the first but it took a few times to finally take effect :/. Hopefully this helps someone using wamp. Now off to learn French lol :P.

 

EDIT: It may not be persistent due to file permissions as someone mentioned previously. I will give that a go sometime and see if it changes things.

Edited by Teh Dango

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.