Error
Error Code:
1527
MariaDB Error 1527: Duplicate Option Specification
Description
MariaDB Error 1527 indicates that a specific option or parameter has been defined multiple times within a single Data Definition Language (DDL) statement, such as `CREATE TABLESPACE` or `CREATE LOGFILE GROUP`. This error occurs because certain attributes are designed to be unique and cannot be repeated in the same command.
Error Message
It is not allowed to specify %s more than once
Known Causes
3 known causesDuplicated Filegroup Option
An option specific to filegroups or logfile groups, such as `DATAFILE` or `UNDOFILE` parameters, was mistakenly included more than once in the `CREATE` statement.
Redundant Syntax in DDL
The DDL statement contains a parameter or attribute that is repeated, violating the syntax rules where an option is expected to be unique for a given clause.
Typographical Error
A simple typo or copy-paste error led to the accidental duplication of an option name or its associated value within the command.
Solutions
3 solutions available1. Identify and Remove Duplicate Option in Configuration File easy
Locate and delete the repeated configuration option from your MariaDB configuration file.
1
Identify the MariaDB configuration file(s) being used. Common locations include `/etc/my.cnf`, `/etc/mysql/my.cnf`, `/etc/mysql/mariadb.conf.d/`, and `~/.my.cnf`.
2
Open the relevant configuration file(s) in a text editor. For example, using `nano` on Linux:
sudo nano /etc/my.cnf
3
Carefully scan the file for the option that is causing the error. The error message `It is not allowed to specify %s more than once` will tell you which option is duplicated. For example, if the error is about `innodb_buffer_pool_size`, look for multiple lines with `innodb_buffer_pool_size = ...`.
4
Delete all but one instance of the duplicate option. Ensure the remaining instance is correctly configured.
5
Save the changes to the configuration file and exit the editor.
6
Restart the MariaDB service for the changes to take effect.
sudo systemctl restart mariadb
2. Correct Duplicate Options in `mysqld_safe` or `mariadbd` Command Line medium
If MariaDB is started with command-line arguments, remove the repeated option from the startup script.
1
Locate the script or systemd service unit that starts `mysqld_safe` or `mariadbd`. This is often found in `/etc/init.d/` or `/usr/lib/systemd/system/` (e.g., `mariadb.service`).
2
Examine the script for lines that invoke `mysqld_safe` or `mariadbd` and include options.
3
Look for the specific option mentioned in the error message being passed multiple times as a command-line argument.
4
Remove the duplicate command-line option. Ensure only one instance of the option exists.
5
If you modified a systemd service file, reload the systemd daemon.
sudo systemctl daemon-reload
6
Restart the MariaDB service.
sudo systemctl restart mariadb
3. Address Duplicate Options in `~/.my.cnf` or User-Specific Configurations easy
Clean up duplicate settings in the user's personal MariaDB configuration file.
1
Check the user's home directory for a `.my.cnf` file (e.g., `/home/youruser/.my.cnf`).
2
Open the `.my.cnf` file in a text editor.
nano ~/.my.cnf
3
Identify and remove any duplicate option specifications, similar to how you would for the main configuration file.
4
Save the file and restart the MariaDB client or application that is encountering the error.