Last answered:

15 Feb 2023

Posted on:

29 Nov 2022

2

Error Code: 1231

I get an error with the NO_AUTO_CREATE_USER in the parameters. It works fine without that parameter.

image.png



Some Google sleuthing leads me to think that parameter is not valid/accepted in newer versions of SQL and should be removed.



image.png

4 answers ( 0 marked as helpful)
Instructor
Posted on:

02 Dec 2022

1

Hi Zachary!
Thanks for reaching out!

This error relates to the settings of MySQL that may project in different errors when trying to run some of the queries.
Hence, please just execute the following query, and then retry. Thank you.
SET @@session.sql_mode = 'NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';  

If yes, then do you still get this Error Code: 1231?

Looking forward to your answer.
Best,
Tsvetelin

Posted on:

13 Dec 2022

1

I execcute the following
SET SESSION sql_mode = 'STRICT_TRANS_TABLES, NO_ZERO_DATE, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION' ;
and I got
Error Code: 1231. Variable 'sql_mode' can't be set to the value of ' NO_ZERO_DATE'
Error Code: 1231. Variable 'sql_mode' can't be set to the value of ' NO_AUTO_CREATE_USER'

Then I try to execute the following query, and then retry.
SET @@session.sql_mode = 'NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';  
I still get this Error Code: 1231

Posted on:

15 Feb 2023

1

Hi, I get the same error after executing:


SET @@session.sql_mode = 'NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';  

/*here I get a warning */



SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

/*Error Code: 1231. Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'
*/


I'll appreciate your assistance

Posted on:

15 Feb 2023

0

I also get the error when trying:

SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

/*Error Code: 1231. Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'
*/


Thanks for your help

Submit an answer