FLUSH LOGS in MySQL only affects binary logs.
According to this excerpt from the MySQL Docs:
Closes and reopens all log files. If binary logging is enabled, the
sequence number of the binary log file is incremented by one relative
to the previous file. On Unix, this is the same thing as sending a
SIGHUP signal to the mysqld server (except on some Mac OS X 10.3
versions where mysqld ignores SIGHUP and SIGQUIT).
If you execute FLUSH LOGS and mysqld is writing the error log to a
file (for example, if it was started with the --log-error option), log
file renaming occurs as described in Section 5.2.1, “The Error Log”.
IMHO, as a MySQL DBA these past 7 years, I have personally NEVER SEEN this work on error logs, but only binary logs.
In the latest MySQL Docs concerning MySQL 5.5:
If you flush the logs using FLUSH LOGS or mysqladmin flush-logs and
mysqld is writing the error log to a file (for example, if it was
started with the --log-error option), the effect is version dependent:
As of MySQL 5.5.7, the server closes and reopens the log file. To
rename the file, you can do so manually before flushing. Then flushing
the logs reopens a new file with the original file name. For example,
you can rename the file and create a new one using the following
shell> mv host_name.err host_name.err-old
shell> mysqladmin flush-logs
shell> mv host_name.err-old backup-directory
On Windows, use rename rather than mv.
Prior to MySQL 5.5.7, the server renames the current log file with the
suffix -old, then creates a new empty log file. Be aware that a second
log-flushing operation thus causes the original error log file to be
lost unless you save it under a different name. On Windows, you cannot
rename the error log while the server has it open before MySQL 5.5.7.
To avoid a restart, flush the logs first to cause the server to rename
the original file and create a new one, then save the renamed file.
That also works on Unix, or you can use the commands shown earlier.
No error log renaming occurs when the logs are flushed in any case if
the server is not writing to a named file.
Again, I repeat, I have personally NEVER SEEN this work on error logs, but only binary logs.
My employer's clients have this bash scripted.