๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Database

โœ… solved * MySQL: ERROR 1418 (HY000): ...

MySQL๋กœ ํ•จ์ˆ˜๋ฅผ ์ƒ์„ฑํ•ด๋ณด๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋–ด๋‹ค..

 

ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration 

and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

 

์‚ฌ์šฉ์ž์—๊ฒŒ ์ƒ์„ฑ๊ถŒํ•œ์„ ์ฃผ์—ˆ๋Š”๋ฐ๋„ ์ด๋Ÿฐ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒจ์„œ ๋‹นํ™ฉํ–ˆ๋Š”๋ฐ ํ•œ๊ฐ€์ง€ ์„ค์ •์ด ๋” ํ•„์š”ํ–ˆ๋‹ค.

 

 

์‹œ์ž‘ !

1. root ๊ณ„์ •์œผ๋กœ ๋กœ๊ทธ์ธ

2. log_bin_trust_function_creators ๊ฐ’ ๋ณ€๊ฒฝ

์ผ๋‹จ ๊ฐ’์„ ๋จผ์ €ํ™•์ธํ•ด๋ณด์ž! ๊ธฐ๋ณธ ๊ฐ’์ด off๋กœ ๋˜์–ด์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค!

mysql> show global variables like 'log_bin_trust_function_creators';

 

 

์ด ์นœ๊ตฌ๋ฅผ ON์œผ๋กœ ๋ฐ”๊พธ์–ด์ค˜์•ผ ์ƒ์„ฑ์ด ๊ฐ€๋Šฅํ•˜๋‹ค!

 

  • 1 = 'ON' : ๊ณ„์ •์—์„œ function์„ ์ƒ์„ฑ ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค.
  • 0 = 'OFF' : ๊ณ„์ •์—์„œ function์„ ์ƒ์„ฑ ํ•  ์ˆ˜ ์—†๋„๋ก ํ•œ๋‹ค.
mysql> set global log_bin_trust_function_creators = 1;

๋˜๋Š”

mysql> set global log_bin_trust_function_creators = 'ON';

 

์ดํ›„ function์„ ์ƒ์„ฑํ•˜๋ฉด ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค!

 

 

 


Thanks for ๐Ÿ™ˆ