Menu

#4726 "Could not find [mysqld] section in my.cnf" for MariaDB as it has different cnf locations

1.791
closed-fixed
nobody
1
2016-03-27
2016-03-23
gyuri79
No

Just installed MariaDB 10.1 and I noticed I am no longer able to edit my.cnf through Webmin. It says "Could not find [mysqld] section in my.cnf"

Discussion

  • Jamie Cameron

    Jamie Cameron - 2016-03-24

    Can you post your my.cnf file?

     
  • gyuri79

    gyuri79 - 2016-03-24

    Sure, here is the default my.cnf file by MariaDB 10.1

    I fixed this issue by simply restoring my old my.cnf from mysql. Hope that info helps.

    #
    # This group is read both both by the client and the server
    # use it for options that affect everything
    #
    [client-server]
    
    #
    # include all files from the config directory
    #
    !includedir /etc/my.cnf.d
    
     
  • Jamie Cameron

    Jamie Cameron - 2016-03-26

    Ok, that !includedir line is probably the problem. Do any of the files in /etc/my.cnf.d have a line like [mysqld] ?

     
  • gyuri79

    gyuri79 - 2016-03-26

    Yes, a server.cnf file exists there. Here are the contents

    [root@CentOS-72-64-minimal my.cnf.d]# ls -lhta
    total 36K
    drwxr-xr-x. 117 root root  12K Mar 25 23:47 ..
    drwxr-xr-x    2 root root 4.0K Mar 23 07:47 .
    -rw-r--r--    1 root root  295 Feb 24 15:25 client.cnf
    -rw-r--r--    1 root root  763 Feb 24 15:25 enable_encryption.preset
    -rw-r--r--    1 root root  232 Feb 24 15:25 mysql-clients.cnf
    -rw-r--r--    1 root root 1.1K Feb 24 15:25 server.cnf
    -rw-r--r--    1 root root  285 Feb 24 15:25 tokudb.cnf
    [root@CentOS-72-64-minimal my.cnf.d]# cat server.cnf
    #
    # These groups are read by MariaDB server.
    # Use it for options that only the server (but not clients) should see
    #
    # See the examples of server my.cnf files in /usr/share/mysql/
    #
    
    # this is read by the standalone daemon and embedded servers
    [server]
    
    # this is only for the mysqld standalone daemon
    [mysqld]
    
    #
    # * Galera-related settings
    #
    [galera]
    # Mandatory settings
    #wsrep_on=ON
    #wsrep_provider=
    #wsrep_cluster_address=
    #binlog_format=row
    #default_storage_engine=InnoDB
    #innodb_autoinc_lock_mode=2
    #
    # Allow server to accept connections on all interfaces.
    #
    #bind-address=0.0.0.0
    #
    # Optional setting
    #wsrep_slave_threads=1
    #innodb_flush_log_at_trx_commit=0
    
    # this is only for embedded server
    [embedded]
    
    # This group is only read by MariaDB servers, not by MySQL.
    # If you use the same .cnf file for MySQL and MariaDB,
    # you can put MariaDB-only options here
    [mariadb]
    
    # This group is only read by MariaDB-10.1 servers.
    # If you use the same .cnf file for MariaDB of different versions,
    # use this group for options that older servers don't understand
    [mariadb-10.1]
    
     
  • Jamie Cameron

    Jamie Cameron - 2016-03-26

    Ok, sounds like I need to add support for include files.

    Which Linux distributuion are you running there, and where did you install MariaDB 10.1 from?

     
  • gyuri79

    gyuri79 - 2016-03-26

    I am running CentOS7, installed Maria from their rpm repo.

     
  • Jamie Cameron

    Jamie Cameron - 2016-03-27
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2016-03-27

    Thanks - this will be fixed in the next Webmin release.

     

Log in to post a comment.