Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在哪里可以找到包含所有参数的mysql配置文件?_Mysql_Linux_Ubuntu_Configuration_Mariadb - Fatal编程技术网

在哪里可以找到包含所有参数的mysql配置文件?

在哪里可以找到包含所有参数的mysql配置文件?,mysql,linux,ubuntu,configuration,mariadb,Mysql,Linux,Ubuntu,Configuration,Mariadb,在哪里可以找到包含所有参数的mysql配置文件? 我在中找到了一些配置文件 /etc/mysql/ 目录,但没有任何包含所有参数的文件 实际上,我想远程访问我机器的mysql服务器。所以我在文件中找到了bind address参数,但是没有一个文件包含所有参数! 以下是我在此目录中找到的文件: ./conf.d ./conf.d/mysql.cnf ./conf.d/mysqldump.cnf ./debian-start ./debian.cnf ./mariadb.cnf ./m

在哪里可以找到包含所有参数的mysql配置文件? 我在中找到了一些配置文件

/etc/mysql/

目录,但没有任何包含所有参数的文件

实际上,我想远程访问我机器的mysql服务器。所以我在文件中找到了bind address参数,但是没有一个文件包含所有参数! 以下是我在此目录中找到的文件:

./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
我读过一些文章,说my.cnf是mysql配置文件,但没有绑定地址或任何东西,这是my.cnf文件的输出

# 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版本: mysql版本15.1发行版10.3.22-MariaDB,适用于使用readline 5.2的debian linux gnu x86_64

计算机名称和版本:

一,。Linux parrot 5.6.0-2parrot1-amd64 1 SMP Debian 5.6.14-2parrot1 2020-05-23 x86_64 GNU/Linux

二,。Linux ubuntu VirtualBox 4.15.0-106-generic 107~16.04.1-ubuntu SMP周四6月4日15:39:45 UTC 2020 i686 i686 i686 GNU/Linux

使用绩效计划; 选择*from.global_variables,其中变量_名称位于“绑定地址”和“端口”中


您可以使用以下命令查看my.cnf文件的搜索路径:sudo mysqld-help-verbose | grep cnf

通常的搜索路径是:/etc/my.cnf/etc/mysql/my.cnf/usr/etc/my.cnf/.my.cnf


如果不存在,则创建一个/etc/my.cnf文件。

您想将设置放在my.cnf或其他文件中吗

# 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/

或者您想要所有500个左右的设置,包括默认设置,例如在SHOW VARIABLES中?

它说错误1146 42S02:表“performance\u schema.global\u VARIABLES”不存在!知道该怎么做吗?是的,我已经尝试创建那些目录或文件(如果没有)上列出的.cnf文件。并试图在这些文件中附加bind address=0.0.0.0,但我仍然关闭了该端口。我知道0.0.0.0是有风险的,但我会在工作完成后立即更改。请检查防火墙是否接受来自网络外部的端口3306上的连接。使用Telnet进行验证。示例:telnet{db server ip}3306或使用此[to check on line And,to allow in firewall like iptables use below command:Append rule to the end of the INPUT chain sudo iptables-A INPUT-p tcp-m tcp-dport 3306-d 0.0.0.0-j ACCEPTinformation_schema.global_变量应给出相同的结果。