October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

Fixing the mysqld_safe Error Log and Syslog Conflict

The mysqld_safe conflict occurs when MySQL is configured for both an error-log file and syslog. Learn how to identify the active startup path, remove duplicate options, configure file or native syslog logging, and verify the result under systemd.
Length8 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The message Can't log to error log and syslog at the same time. means MySQL has been given two mutually exclusive logging destinations. One setting selects an error-log file with --log-error; another selects the system logger with --syslog. Remove one destination, restart MySQL through its normal service manager, and verify the destination you kept.

What the conflict means

When mysqld_safe starts mysqld, it coordinates error and notice messages from both processes. A file destination and a syslog destination cannot be active simultaneously for that startup path. If the effective options contain both log-error=/path/to/error.log and syslog, startup stops with the conflict message recorded in MySQL Bug #72598: Can't log to error log and syslog at the same time.

As an Amazon Associate I earn from qualifying purchases.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is a configuration collision, not evidence that the error-log file is damaged or that syslog itself is unavailable. Pick the destination that matches your operating model and remove every setting that selects the other one.

File logging and syslog compared

Decision point Error-log file System logger
Destination A file selected by log-error, or the default host_name.err file in the data directory The operating system’s syslog facility or, commonly under systemd, the journal
Configuration owner mysqld_safe and/or the server option file, depending on the startup path Prefer MySQL server-native system-log support; legacy mysqld_safe switches are deprecated
Operational visibility Inspect with tools such as tail or a log-management agent that reads files Inspect with the platform’s journal or syslog tools, such as journalctl on systemd systems
Rotation and retention You must arrange suitable rotation, ownership, retention, and disk-space monitoring The system logging stack normally provides its own routing, rotation, and retention policy
Systemd compatibility Possible when the service deliberately starts mysqld_safe; not automatically applicable to a unit that starts mysqld directly Best aligned with a systemd-managed service when the server’s native logging and the unit’s journal integration are configured

Identify how MySQL is being started

Do this before editing an option file. The correct fix depends on whether a wrapper script is actually running.

Check the service unit

  1. Find the service name used by the host, for example mysql or mysqld, with your distribution’s service listing.
  2. Inspect its state and command definition: systemctl status mysql and systemctl cat mysql (substitute the actual unit name).
  3. Look for an ExecStart command containing mysqld_safe. If the unit starts mysqld directly, the wrapper’s options are not the service’s primary configuration path.

Check the running command line

After a successful start, inspect the process list and command line for mysqld_safe, mysqld, --syslog, and --log-error. A process command line can reveal a service override or generated argument that is not obvious in the option files. If the server fails before staying up, use the service manager’s status output and boot journal to inspect the attempted command.

Why this distinction matters

Some modern packages do not install mysqld_safe at all. MySQL documents that [mysqld_safe] and the older [safe_mysqld] option-file sections are unsupported, or may behave unexpectedly, when systemd controls startup. In that situation, change the unit and the server’s own logging configuration rather than trying to repair a wrapper that is not in the execution path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find every setting that selects a destination

The conflict often persists because one option is in a global file while another is supplied by a service override or command line. Search all files included by your installation, including distribution-specific directories, and inspect the effective service definition.

  1. Search option files for the three relevant names: syslog, skip-syslog, and log-error. Include both option groups and any included files.
  2. Check systemd drop-ins and generated service arguments with systemctl cat <unit>. An override can append --syslog even when the main option file does not.
  3. Inspect the process command line when possible. Command-line options can override values read earlier from files.
  4. Write down every occurrence before changing anything. Your final configuration must select one destination only.

Do not assume that deleting one line is sufficient if an included file or service override still supplies the opposite setting. Keep comments that explain the chosen destination, but remove active duplicate directives.

Fix the configuration for an error-log file

Choose the file destination

Set log-error=/path/to/error.log in the option group read by the server or by the wrapper that really starts it. If you do not specify a path, MySQL’s default is a host_name.err file in the data directory. The explicit path is usually easier to monitor, but it must be writable by the account running MySQL and have enough free space.

Disable syslog explicitly

Remove --syslog wherever it appears. You can also use --skip-syslog as the explicit switch that suppresses syslog. The current MySQL 8.4 manual states that --skip-syslog writes to the default error-log file, or to the file named by --log-error.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Restart and verify

  1. Restart with the same manager that normally owns the service, for example systemctl restart <unit>. Do not launch a second manual mysqld_safe process while the service is managed by systemd.
  2. Check the service result and the selected file. Use tail -f /path/to/error.log while reproducing a harmless administrative action, or inspect the newest entries after startup.
  3. Confirm the running command line no longer contains --syslog and that the configured file is receiving new startup messages.

With no syslog destination selected, notices are sent to the selected destination and standard output, while errors are sent to the destination and standard error. A journal entry produced by the service manager does not prove that the MySQL error log is configured as a file; systemd may capture standard streams independently.

Fix the configuration for system logging

Remove the competing file destination

If the system logger is the intended destination, remove log-error from the wrapper configuration and remove any file destination added by a service override. Do not leave a file option in one included file while adding syslog in another: the two destinations recreate the same collision.

Use the server’s native system-log support

MySQL supports native error logging to syslog on Unix-like systems. Configure that support in the server’s own option group and let the operating system’s logging stack handle routing, retention, and access. The mysqld_safe --syslog and --skip-syslog controls are deprecated, so they are a poor foundation for a new deployment or a migration to a current release.

Verify the journal or syslog stream

  1. Restart through the service manager.
  2. Read the unit’s current-boot messages with journalctl -u <unit> -b when systemd is in use, or use the host’s configured syslog reader.
  3. Check that MySQL startup and error messages arrive in the expected facility or journal stream and that no old file is still being updated.

Do not treat an old error-log file as proof that file logging remains enabled; it may simply contain historical entries. Check timestamps and observe the destination during a fresh restart.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Systemd-specific startup pitfalls

A systemd unit can start mysqld directly, capture its standard output and error, and apply command-line arguments independently of traditional SysV scripts. In that arrangement:

  • mysqld_safe may be absent, unused, or deliberately bypassed.
  • Settings under [mysqld_safe] or [safe_mysqld] may be ignored or produce unexpected behavior.
  • The unit file and its drop-ins, together with the server’s native option group, are the places to configure startup and logging.
  • Changing a legacy wrapper file will not fix an argument injected by ExecStart or a systemd override.

Use systemctl cat <unit> to see the complete unit and drop-ins. If an override must be changed, edit it with the service manager’s supported override mechanism, then reload unit definitions before restarting. Keep the logging decision in one documented place so a package update does not silently reintroduce a second destination.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the common failure modes

The conflict returns after editing one file

Another option file, an included directory, an environment-generated argument, or a systemd drop-in still supplies --syslog or log-error. Repeat the search across every included file and inspect the complete unit definition and command line. Remove the duplicate rather than trying to make both switches coexist.

No error-log file appears after choosing file logging

Confirm that the path is the one actually read by the active server, that its parent directory exists, and that the MySQL service account can create or append the file. Also check whether the service starts mysqld directly; a [mysqld_safe] setting cannot control a wrapper that is not running. The default host_name.err location is the data directory, not necessarily the directory where an administrator expects logs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The journal contains messages even though file logging was selected

systemd can collect standard output and standard error from any service. MySQL’s notices and errors may therefore appear in the journal while the configured error log also receives messages. Verify the file’s modification time and contents; journal visibility alone does not establish the selected MySQL destination.

Syslog is selected but the expected stream is empty

Check that the native server syslog configuration is in the server’s option group, that the host’s syslog or journal service is running, and that its routing rules accept the facility used by MySQL. Inspect the service startup output for permission or configuration errors. If the unit is systemd-managed, read the unit journal as well as any traditional syslog file.

The service will not restart after the change

Read the first startup error from systemctl status <unit> and journalctl -u <unit> -b, or the equivalent service-manager diagnostics. Check for a misspelled option, an inaccessible log path, an invalid override, or a still-present pair of destination settings. Restore the last known-good single destination, then make one change at a time.

What changed in MySQL 8.4 and later configuration practice

The current MySQL 8.4 documentation says that when none of the syslog destination options is supplied, the default is --skip-syslog. That default favors file logging rather than silently enabling the system logger. It does not, however, cancel an explicit --syslog supplied elsewhere, nor does it resolve a simultaneous log-error setting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The same documentation deprecates controlling MySQL logging from mysqld_safe and directs administrators toward the server’s native syslog support. For a new configuration, first decide whether files or the system logger fit your monitoring, rotation, access-control, and retention requirements; then implement that choice in the component that actually starts the server.

A safe final checklist

  • Identify whether the service starts mysqld_safe or mysqld directly.
  • Search every option file, included directory, command line, and service override for syslog, skip-syslog, and log-error.
  • Select exactly one destination: an error-log file or the system logger.
  • For file logging, remove --syslog, optionally set --skip-syslog, and verify the file path and permissions.
  • For system logging, remove the competing file destination and configure native server syslog support rather than relying on deprecated wrapper switches.
  • Restart through the normal service manager.
  • Verify the chosen destination directly, using the error file or the journal/syslog reader, and check fresh timestamps.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.