0

Want to execute this on MySQL 5.0:

set global log_warnings = 2;

Will the setting stick after a mysqld service restart?

blizz
  • 1,134
  • 1
  • 26
  • 47

1 Answers1

2

No. Variable could be enabled in option file my.cnf, otherwise after restart it will be reset to default value 1

Kondybas
  • 6,964
  • 2
  • 20
  • 24
  • Ok so if I do it my way, it will start logging aborted connections right after execution? – blizz Jan 23 '14 at 23:03
  • @blizz [Not in 5.0 or 5.1. There's a bug regarding aborted connections](http://dba.stackexchange.com/questions/19285/log-warnings-doesnt-seem-to-work-for-aborted-connections-in-mysql-5-1). Should work in 5.5 and later but even that's not certain. – Ladadadada Jan 23 '14 at 23:30
  • oh well that's confusing...so I can't log aborted connections in 5.0 except in the general query log? Would I enable it the same way, or do I need to set it in my.cnf and restart the service? – blizz Jan 24 '14 at 01:11
  • Simply do both. – Matthias Urlichs Jan 24 '14 at 10:06