Mariadb 配置分配的内存

Mariadb 配置分配的内存,mariadb,Mariadb,我想为我的MariaDB服务器分配更多内存,但在查找正确的my.cnf文件时遇到困难 基本上我想编辑innodb_buffer_pool_大小 这是/etc/my.cnf中my.cnf文件的内容 [mysqld] bind-address = :: skip_name_resolve local-infile=0 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling

我想为我的MariaDB服务器分配更多内存,但在查找正确的my.cnf文件时遇到困难

基本上我想编辑innodb_buffer_pool_大小

这是/etc/my.cnf中my.cnf文件的内容

 [mysqld]
    bind-address = ::
    skip_name_resolve
    local-infile=0
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    # Disabling symbolic-links is recommended to prevent assorted security risks
    symbolic-links=0
    # Settings user and group are ignored when systemd is used.
    # If you need to run mysqld under a different user or group,
    # customize your systemd unit file for mariadb according to the
    # instructions in http://fedoraproject.org/wiki/Systemd

    [mysqld_safe]
    log-error=/var/log/mariadb/mariadb.log
    pid-file=/var/run/mariadb/mariadb.pid

    #
    # include all files from the config directory
    !includedir /etc/my.cnf.d
因此,我继续检查/etc/my.cnf.d中的文件中的innodb_buffer_pool_size值,但大多数文件几乎都是空的

我应该用我喜欢的值添加字符串吗?还是我找错地方了

使用Plesk 17.5.3#18 CentOS 7和MariaDB 10.1.25

希望有人能帮我解决这个问题

我按照建议将inno_db_buffer_大小添加到my.cnf中,但是

您好,我调整了值并重新启动了服务,但当我运行时: 它提供了以下输出:

    Set thread_cache_size to 4 as a starting value
    Performance should be activated for better diagnostics
    Consider installing Sys schema from https://github.com/mysql/mysql-sys
Variables to adjust:
    query_cache_size (=0)
    query_cache_type (=0)
    query_cache_limit (> 1M, or use smaller result sets)
    join_buffer_size (> 256.0K, or always use indexes with joins)
    tmp_table_size (> 16M)
    max_heap_table_size (> 16M)
    thread_cache_size (start at 4)
    performance_schema = ON enable PFS
    innodb_buffer_pool_size (>= 139M) if possible.
    innodb_log_file_size should be (=16M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
    innodb_buffer_pool_instances (=1)
您好,我调整了值并重新启动了服务,但当我运行时: 它提供了以下输出:

    Set thread_cache_size to 4 as a starting value
    Performance should be activated for better diagnostics
    Consider installing Sys schema from https://github.com/mysql/mysql-sys
Variables to adjust:
    query_cache_size (=0)
    query_cache_type (=0)
    query_cache_limit (> 1M, or use smaller result sets)
    join_buffer_size (> 256.0K, or always use indexes with joins)
    tmp_table_size (> 16M)
    max_heap_table_size (> 16M)
    thread_cache_size (start at 4)
    performance_schema = ON enable PFS
    innodb_buffer_pool_size (>= 139M) if possible.
    innodb_log_file_size should be (=16M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
    innodb_buffer_pool_instances (=1)
在我看来,即使我调整了值,也没有反映出来。
如何检查此项?

您可以不看到
innodb\u buffer\u pool\u大小
。大多数MySQL参数未在
/etc/my.cnf
中定义,数据库服务器使用默认参数。对于
innodb\u buffer\u pool\u size
它是128M。

要设置此值,只需在
/etc/my.cnf
[mysqld]
中定义它。例如
innodb\u buffer\u pool\u size=512M

您可以不看到
innodb\u buffer\u pool\u size
。大多数MySQL参数未在
/etc/my.cnf
中定义,数据库服务器使用默认参数。对于
innodb\u buffer\u pool\u size
它是128M。

要设置此值,只需在
/etc/my.cnf
[mysqld]
中定义它。例如
innodb\u buffer\u pool\u size=512M

谢谢您的输入,我对其进行了调整,但没有反映出来,请参见我问题中的添加内容。提前谢谢!您应该在更新
/etc/my.cnf
后重新启动数据库服务器。要检查设置的值,请登录到数据库服务器并运行
选择@@innodb\u buffer\u pool\u size/1024/etc/my.cnf
后重新启动数据库服务器。要检查设置的值,请登录到数据库服务器并运行
选择@@innodb\u buffer\u pool\u size/1024