skip to Main Content

Where can I find mysql config file with all parameters ?
I found some config files in

/etc/mysql/

directory but there isnt any file with all parameters !

Actually I want my machine’s mysql server to be remotely accessed. So I was finding “bind-address” parameter in the file but there is not one file with all parameters !
These are the files I found in this directory:

./conf.d 
./conf.d/mysql.cnf 
./conf.d/mysqldump.cnf 
./debian-start 
./debian.cnf 
./mariadb.cnf 
./mariadb.conf.d 
./mariadb.conf.d/50-client.cnf 
./mariadb.conf.d/50-mysql-clients.cnf 
./mariadb.conf.d/50-mysqld_safe.cnf 
./mariadb.conf.d/50-server.cnf 
./my.cnf.fallback 
./my.cnf

I read some articles saying that my.cnf is the mysql config file but there is no bind-address or anything this is the output of my.cnf file.

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 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.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

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

mysql version:
mysql Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Machine name and version:

1. Linux parrot 5.6.0-2parrot1-amd64 #1 SMP Debian 5.6.14-2parrot1 (2020-05-23) x86_64 GNU/Linux

2. Linux ubuntu-VirtualBox 4.15.0-106-generic #107~16.04.1-Ubuntu SMP Thu Jun 4 15:39:45 UTC 2020 i686 i686 i686 GNU/Linux

3

Answers


  1. Try tables like:

    use performance_schema;
    select * from .global_variables where variable_name in (‘bind address’,’port’);

    SQuirreL select

    Login or Signup to reply.
  2. You can see the search path for my.cnf file by using the following command: sudo mysqld –help –verbose | grep cnf

    The normal search path is: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf /.my.cnf

    And, if not present then create a /etc/my.cnf file.

    Login or Signup to reply.
  3. Do you want the settings you put in my.cnf or some other file?

    Or do you want all 500 or so settings, including the defaults, such as in SHOW VARIABLES?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search