zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    男子利用POS机帮人非法套现1576万余元被起诉
    套现花样很多 弄不好成了诈骗
    刀尖上的无本生意 信用卡套现投资盛行
    新三板是什么—新三板科普知识讲堂
    Android注入事件的三种方法比较
    当今最流行的Node.js应用开发框架简介
    安卓WindowManager注入事件如何跳出进程间安全限制
    伟大创意检验10要
    初创互联网公司简明创业指南
    根据Unix哲学来编写你的HTML5 Websocket服务器来实现全双工通信
  • 原文地址:https://www.cnblogs.com/connected/p/12620831.html
Copyright © 2011-2022 走看看