Everytime I restart MySQL I have this warning:

[Warning] Buffered warning: Changed limits: max_connections: 214 (requested 800)
So I have to change max_connections variable:

set global max_connections = 800;
But /etc/my.cf has max_connections set:

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
max_connections = 800
I also modified mysqld.service:

Start main service

ExecStart=/usr/bin/mysqld_safe --defaults-file=/etc/my.cnf
I've also updated max open files of Centos from 1024 to 2000:

ulimit -Sa | grep "open files"
open files (-n) 2000
But the problem persists.

Mysql log start:

150924 13:15:04 mysqld_safe mysqld from pid file

/var/run/mysqld/mysqld.pid ended
150924 13:15:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2015-09-24 13:15:04 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-09-24 13:15:04 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25) starting as process 29997 ...
2015-09-24 13:15:04 29997 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2015-09-24 13:15:04 29997 [Warning] Buffered warning: Changed limits: max_connections: 214 (requested 800)

2015-09-24 13:15:04 29997 [Warning] Buffered warning: Changed limits: table_open_cache: 400 (requested 2000)

2015-09-24 13:15:04 29997 [Note] Plugin 'FEDERATED' is disabled.
2015-09-24 13:15:04 29997 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-09-24 13:15:04 29997 [Note] InnoDB: The InnoDB memory heap is disabled
2015-09-24 13:15:04 29997 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-09-24 13:15:04 29997 [Note] InnoDB: Memory barrier is not used
2015-09-24 13:15:04 29997 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-09-24 13:15:04 29997 [Note] InnoDB: Using Linux native AIO
2015-09-24 13:15:04 29997 [Note] InnoDB: Using CPU crc32 instructions
2015-09-24 13:15:04 29997 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-09-24 13:15:04 29997 [Note] InnoDB: Completed initialization of buffer pool
2015-09-24 13:15:04 29997 [Note] InnoDB: Highest supported file format is Barracuda.
2015-09-24 13:15:04 29997 [Note] InnoDB: 128 rollback segment(s) are active.
2015-09-24 13:15:04 29997 [Note] InnoDB: Waiting for purge to start
2015-09-24 13:15:04 29997 [Note] InnoDB: 5.6.25 started; log sequence number 24337684937
2015-09-24 13:15:04 29997 [Note] Server hostname (bind-address): '*'; port: 3306
2015-09-24 13:15:04 29997 [Note] IPv6 is available.
2015-09-24 13:15:04 29997 [Note] - '::' resolves to '::';
2015-09-24 13:15:04 29997 [Note] Server socket created on IP: '::'.
2015-09-24 13:15:04 29997 [Note] Event Scheduler: Loaded 0 events
2015-09-24 13:15:04 29997 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.25' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
I tried all Google solutions, but the result is always the same...

MySQL is running on CentOS Linux release 7.1.1503 (Core).

Thanks!

解决方法:

vi /etc/security/limits.conf
增加以下两行
mysql hard nofile 65535
mysql soft nofile 65535

vi /usr/lib/systemd/system/mysqld.service
增加下面一行
LimitNOFILE=65535

重启服务器,问题解决。

Centos 7 mysql Buffered warning: Changed limits: max_connections: 214 解决方法的更多相关文章

  1. Mysql报错[Warning] TIMESTAMP with implicit DEFAULT value is deprecated和Buffered warning: Changed limits

    报错2019-04-24 12:06:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- ...

  2. ubuntu下mysql提示Changed limits: max_open_files:1024解决办法

    在配置我的md5解密网站cmd5.la的时候,mysql5.7出现了max_open_files: 1024, max_connections: 214,warning: Changed limits ...

  3. Mysql错误:Ignoring query to other database解决方法

    Mysql错误:Ignoring query to other database解决方法 今天登陆mysql show databases出现Ignoring query to other datab ...

  4. MySQL安装配置最后时未响应解决方法

    安装MySQL出示未响应,一般显示在安装MySQL程序最后一步的2,3项就不动了. 这种情况一般是你以前安装过MySQL数据库服务项被占用了.解决方法:一种方法:你可以安装MySQL的时候在这一步时它 ...

  5. MySQL 出现 The table is full 的解决方法

    原文链接: MySQL 出现 The table is full 的解决方法 浅谈MySql的存储引擎(表类型) MySQL 出现 The table is full 只有一个原因,对应的表数据容量达 ...

  6. mysql 1053错误,无法启动的解决方法

    mysql 1053错误,无法启动的解决方法 windows2003服务器中,服务器重启后Mysql却没有启动,手动启动服务时提示1053错误. 尝试了以下方法,终于解决. 1.在DOS命令行使用 第 ...

  7. CentOS编译PHP过程中常见错误信息的解决方法

    原文链接:http://www.linuxidc.com/Linux/2014-05/102327.htm ********************************************** ...

  8. MySQL mysqldump与source导入慢的解决方法

    Jquery中文网 >  数据库  >  mysql  >  正文 MySQL mysqldump与source导入慢的解决方法 MySQL mysqldump与source导入慢的 ...

  9. mysql创建外链失败1005错误解决方法

    mysql创建外链失败1005错误解决方法 错误号:1005错误信息:Can't create table 'webDB.#sql-397_61df' (errno: 150)解决方法 错误原因有四: ...

随机推荐

  1. LINQ绑定List到GridView

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  2. Shell 编程基础之 && 与 ||

    一.引言 Shell 在执行某个命令的时候,会返回一个返回值,该返回值保存在 shell 变量 $? 中.当 $? == 0 时,表示执行成功:当 $? == 1 时,表示执行失败.有时候,下一条命令 ...

  3. Spring任务调度之Timer

    一.分类 由于现在大部分的系统都是采用了spring,所以所有的例子都结合spring来构建,目前主要的任务调度分为三种: Java自带的java.util.Timer类,这个类允许你调度一个java ...

  4. 卸载oracle删除注册表脚本

    一.前言 在我们操作系统中,有时要卸载oracle数据库,每一次都要去删除win下的注册表,为了方便删除注册表的信息,下面通过一种删除注册表快捷的脚本. 二.脚本信息 Windows Registry ...

  5. [深入浅出WP8.1(Runtime)]Windows Phone 8.1和Silverlight 8.1的区别

    1.2.2 Windows Phone 8.1应用程序模型 Windows Phone 8.1支持多种开发语言来开发应用程序,包括C#.VB.JavaScript和C++,那么本书的代码主要是采用C# ...

  6. JSON和JSONP (含jQuery实例)(share)

    来源:http://www.cnblogs.com/dowinning/archive/2012/04/19/json-jsonp-jquery.html 前言: 说到AJAX就会不可避免的面临两个问 ...

  7. Tornado学习笔记12 tornado.httpserver-.非阻塞的Http服务器

    是一个非阻塞的,单线程的Http 服务器. 一般地,应用程序很少与HttpServer类直接交互,除非在进程开始时启动服务时(甚至在使用tornado.web.Applicaiton.listen时也 ...

  8. LINUX内核参数网络相关

    有助于提高网络性能和吞吐量的参数 net.core.somaxconn = 128 已完成连接队列(completed connection queue) (1)三次握手已经完成,但还未被应用层接收( ...

  9. 基于淘宝弹性布局方案lib-flexible的问题研究

    上篇文章<淘宝弹性布局方案lib-flexible实践>结合一个简单的实例,说明了lib-flexible的基本用法,但是lib-flexible的这种适配方式在适配的时候会修改viewp ...

  10. css3动画----实现动态省略号 ...

    <h3>实现省略号点点动,纯css3实现动态省略号</h3>上传中<span class="dot">...</span> [css ...