• mysql日志警告信息 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 10000 (requested 10010)


    摘要:

    CentOS+Mysql 8.0.18

    tail -200f /var/log/mysqld.log

    日志信息显示警告

    2020-04-02T06:59:08.994775Z 0 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 10000 (requested 10010)
    2020-04-02T06:59:08.994794Z 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 3995 (requested 4000)
    2020-04-02T06:59:09.345447Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.18) starting as process 11083
    2020-04-02T06:59:10.567181Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
    2020-04-02T06:59:10.656613Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/lib/mysql/mysql.sock' port: 6612 MySQL Community Server - GPL.
    2020-04-02T06:59:10.850059Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060

    查看数据库:

    [root@mysqldb2 ~]# mysql -uroot -p

    mysql> show variables like '%open%';
    +----------------------------+-------+
    | Variable_name              | Value |
    +----------------------------+-------+
    | have_openssl               | YES   |
    | innodb_open_files          | 3995  |
    | mysqlx_port_open_timeout   | 0     |
    | open_files_limit           | 10000 |
    | table_open_cache           | 3995  |
    | table_open_cache_instances | 16    |
    +----------------------------+-------+
    6 rows in set (0.01 sec)
    
    mysql>

    [root@mysqldb2 ~]# find / -name mysqld.service
    /sys/fs/cgroup/pids/system.slice/mysqld.service
    /sys/fs/cgroup/devices/system.slice/mysqld.service
    /sys/fs/cgroup/systemd/system.slice/mysqld.service
    /etc/systemd/system/multi-user.target.wants/mysqld.service
    /usr/lib/systemd/system/mysqld.service

    编辑:

    [root@mysqldb2 ~]# vi /usr/lib/systemd/system/mysqld.service

    找到LimitNOFILE

    # Sets open_files_limit
    LimitNOFILE = 65535

    重新加载服务配置文件

    [root@mysqldb2 ~]# systemctl daemon-reload
    重启mysql服务
    [root@mysqldb2 ~]# systemctl restart mysqld.service

    [root@mysqldb2 ~]# mysql -uroot -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 46
    Server version: 8.0.18 MySQL Community Server - GPL

    Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

    mysql> show variables like '%open%';
    +----------------------------+-------+
    | Variable_name | Value |
    +----------------------------+-------+
    | have_openssl | YES |
    | innodb_open_files | 4000 |
    | mysqlx_port_open_timeout | 0 |
    | open_files_limit | 65535 |
    | table_open_cache | 4000 |
    | table_open_cache_instances | 16 |
    +----------------------------+-------+
    6 rows in set (0.02 sec)

    mysql>

  • 相关阅读:
    [tp3.2.1]sql查询语句(一)
    [crunch bang]在Crunch Bang安装和设置fcitx(小企鹅输入法)
    [tp3.2.1]大D构建模型
    [tp3.2.1]数据模型
    [tp3.2.1]开启URL(重写模式),省略URL中的index.php
    [tp3.2.1]让默认页面: 加载Home模块的Index控制器;而让admin.php默认去加载Admin模块的Adminc控制器.
    [JAVA]在linux中设置JDK环境,ZendStudio,Eclipse
    [fedora21]给fedora21安装fcitx输入法
    Software--Architecture--Design DataAccess 数据访问
    leetcode--Algorithm--Array_Part 1 Easy- 566 Reshape the Matrix
  • 原文地址:https://www.cnblogs.com/connected/p/12620831.html
Copyright © 2020-2023  润新知