1

After an update, I need to re-activate federated option on MySQL 8.0.31.

I have modify /etc/mysql/my.cnf to add federated option and restart MySQL but:

Mysql return mysql: [ERROR] unknown option '--federated'

my.cnf file

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/

#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]
# Port or socket location where to connect
# port = 3306
socket = /run/mysqld/mysqld.sock

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

mysqld.cnf

# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation.  The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA

#
# The MySQL  Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

[mysqld]
federated
bind-address    = 0.0.0.0
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
datadir         = /var/lib/mysql
log-error       = /var/log/mysql/error.log

slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow-queries.log
long_query_time = 2

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION
wait_timeout=28800
connect-timeout=600
interactive-timeout=600

skip-federated not exist in /etc/mysql/conf.d/ conf files.

If I show engines;, I have this response:

ARCHIVE YES Archive storage engine NO NO NO
BLACKHOLE YES /dev/null storage engine (anything you write to it disappears) NO NO NO
MRG_MYISAM YES Collection of identical MyISAM tables NO NO NO
FEDERATED NO Federated MySQL storage engine
MyISAM YES MyISAM storage engine NO NO NO
PERFORMANCE_SCHEMA YES Performance Schema NO NO NO
InnoDB DEFAULT Supports transactions, row-level locking, and foreign keys YES YES YES
MEMORY YES Hash based, stored in memory, useful for temporary tables NO NO NO
CSV YES CSV storage engine NO NO NO

I don't understand why it doesn't work, because FEDERATED plugin exist.

If I start with systemctl and --federated option I have this error:

systemctl : option non reconnue '--federated'

English version

systemctl : option not reconized/known '--federated'

Thanks for your help.

Edit: I have test this solution How can I enable the federated engine in mysql after installation? but you can see that it didn't work since I have the federated line in my.cnf and also in the list of engines without it working and pass to Yes

MaxenceS
  • 25
  • 7
  • MySQL version: 8.0.13 – MaxenceS Jan 06 '23 at 15:25
  • Please show **complete and precise** output for `SELECT VERSION();`. – Akina Jan 06 '23 at 15:35
  • ```mysql> SELECT VERSION(); +-----------+ | VERSION() | +-----------+ | 8.0.13 | +-----------+ 1 row in set (0,00 sec)``` – MaxenceS Jan 06 '23 at 15:42
  • @Moltroon Use of the FEDERATED engine will prove to be undesirable. Performance will be hampered by the insistence on sending every row of the federated table on every access now matter what your WHERE has for selection. – Wilson Hauck Jan 07 '23 at 13:54
  • OK thanks but it's not my choise. We have an old app create with Win Dev and we do not have any maintainer or dev licence to update this. Since the update of MYSQL it no longer works without its federated tables. We will soon replace it but since the update we have to make sure that it still works a little. – MaxenceS Jan 09 '23 at 08:19
  • I think MySQL do not read `mysqld.cnf` conf file. Do you have any idea ? – MaxenceS Jan 09 '23 at 10:03

0 Answers0