title: Can not increase max_open_files for Mysql max-connections in Ubuntu 15
body: <p>I am running this version of Mysql</p>
  
  <pre><code>Ver 14.14 Distrib 5.6.24, for debian-linux-gnu (x86_64)
  </code></pre>
  
  <p>On this version of Ubuntu</p>
  
  <pre><code>Distributor ID: Ubuntu
  Description:    Ubuntu 15.04
  Release:    15.04
  Codename:   vivid
  </code></pre>
  
  <p>This is the config I set for Mysql:</p>
  
  <pre><code>key_buffer_size     = 16M
  max_allowed_packet  = 16M
  thread_stack        = 192K
  thread_cache_size       = 8
  innodb_buffer_pool_size=20G
  innodb_log_buffer_size=16M
  tmp_table_size = 32M
  max_heap_table_size = 32M
  open-files-limit=4510
  max_connections=500
  myisam-recover         = BACKUP
  query_cache_type=1
  query_cache_limit   = 32M
  query_cache_size        = 32M
  </code></pre>
  
  <p>These are the warnings I keep getting when starting MYSQL:</p>
  
  <pre><code>2015-06-17 17:28:53 26720 [Warning] Buffered warning: Could not increase number 
  of max_open_files to more than 1024 (request: 4510)
  
  2015-06-17 17:28:53 26720 [Warning] Buffered warning: Changed limits: max_connections: 
  214 (requested 500)
  
  2015-06-17 17:28:53 26720 [Warning] Buffered warning: Changed limits: table_open_cache: 
  400 (requested 2000)
  </code></pre>
  
  <p>I already tried these steps:</p>
  
  <p>1) Adding this to <code>/etc/security/limits.conf</code></p>
  
  <pre><code>mysql           soft    nofile          65535
  mysql           hard    no file          65535
  </code></pre>
  
  <p>2) Adding this to <code>/etc/pam.d/common-auth</code> and <code>/etc/pam.d/commom-session</code></p>
  
  <pre><code>session required pam_limits.so
  </code></pre>
  
  <p>3) Add this to <code>/etc/mysql/mysql.conf.d/mysqld.cnf</code></p>
  
  <pre><code>open-files-limit=4510 or open_files_limit=4510
  </code></pre>
  
  <p>None of these have worked and I am still not able to raise the mysql max connections to 500.</p>
  
  <p>I'd really appreciate some help at this point.</p>
  
  <p>Thanks a lot in advance.</p>