Al iniciar MariaDB recibí [Advertencia] No se pudo aumentar el número de max_open_files a más de 1024 (solicitud: 4607)
$ sudo systemctl status mysqld
● mysqld.service - MariaDB database server
  Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
  Active: activating (start-post) since Tue 2014-08-26 14:12:01 EST; 2s ago
Main PID: 8790 (mysqld);         : 8791 (mysqld-post)
  CGroup: /system.slice/mysqld.service
      ├─8790 /usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid
      └─control
    ├─8791 /bin/sh /usr/bin/mysqld-post
    └─8841 sleep 1
Aug 26 14:12:01 acpfg mysqld[8790]: 140826 14:12:01 [Warning] Could not increase number of max_open_files to more than 1024 (request: 4607)
Intenté sin éxito solucionar el problema con max_open_files dentro de este archivo:
$ sudo nano /etc/security/limits.conf 
mysql           hard    nofile          8192
mysql           soft    nofile          1200
Incluso reinicié la computadora nuevamente, pero tuve el mismo problema.
El /etc/mysql/my.cnf se ve así:
[mysql]
# CLIENT #
port                           = 3306
socket                         = /home/u/tmp/mysql/mysql.sock
[mysqld]
# GENERAL #
user                           = mysql
default-storage-engine         = InnoDB
socket                         = /home/u/tmp/mysql/mysql.sock
pid-file                       = /home/u/tmp/mysql/mysql.pid
# MyISAM #
key-buffer-size                = 32M
myisam-recover                 = FORCE,BACKUP
# SAFETY #
max-allowed-packet             = 16M
max-connect-errors             = 1000000
skip-name-resolve
sql-mode                       = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
sysdate-is-now                 = 1
innodb                         = FORCE
innodb-strict-mode             = 1
# DATA STORAGE #
datadir                        = /home/u/tmp/mysql/
# BINARY LOGGING #
log-bin                        = /home/u/tmp/mysql/mysql-bin
expire-logs-days               = 14
sync-binlog                    = 1
# CACHES AND LIMITS #
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
max-connections                = 500
thread-cache-size              = 50
open-files-limit               = 65535
table-definition-cache         = 1024
table-open-cache               = 2048
# INNODB #
innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 2
innodb-log-file-size           = 128M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 2G
# LOGGING #
log-error                      = /home/u/tmp/mysql/mysql-error.log
log-queries-not-using-indexes  = 1
slow-query-log                 = 1
slow-query-log-file            = /home/u/tmp/mysql/mysql-slow.log
¿Cómo es posible solucionar el problema con max_open_files?
                    
                        arch-linux
                                mysql
                                mariadb
                                
                    
                    
                        usuario977828
fuente
                
                fuente

Respuestas:
Edite
/etc/security/limits.confy agregue las siguientes líneasluego reiniciar.
Luego edita
/usr/lib/systemd/system/mysqld.serviceo/usr/lib/systemd/system/mariadb.serviceagregaLuego reinicie el servicio db:
fuente
/etc/systemd/system/mysql.service.d/limits.confo/etc/systemd/system/mariadb.service.d/limits.confA mí me funcionó sin problemasOtra razón es que:
debe prestar atención a
table_open_cachcódigo mysql en
mysqld.ccintente con un
table_open_cachvalor más bajofuente
Puede ver las instrucciones oficiales en el archivo mariadb.service;
Necesita reiniciar su sistema operativo. Aunque creo que esto debería estar escrito en el manual oficial ...
fuente
systemctl daemon-reloadal reiniciar MariaDB.Tuve el mismo problema con Ubuntu 15.10 y mysql y lo solucioné con la respuesta anterior con algunas diferencias menores.
Primero cambié
/etc/security/limits.confcomo arriba.Agregué (nada más)
a
/lib/systemd/system/mysql.service(poca diferencia de ubicación)y luego lo hizo
fuente