在最新的“百胜更新”之后,我的centos将不会启动mysqld服务。
我安装了mariadb,更新了yum。现在“yum install mariadb”返回:
Package 1:mariadb-5.5.52-1.el7.x86_64 is obsoleted by mysql-community-client-5.7.18-1.el7.x86_64 which is already installedNothing to do
当尝试执行“service mysqld start”时,会发生以下情况:

[root@vmi192102 ~]# service mysqld start
Redirecting to /bin/systemctl start  mysqld.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
[root@vmi192102 ~]# systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Sun 2017-04-23 22:58:56 CEST; 2s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 9036 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
  Process: 9014 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: Failed to start MySQL Server.
Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: Unit mysqld.service entered failed state.
Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: mysqld.service failed.
Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: mysqld.service holdoff time over, scheduling restart.
Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: start request repeated too quickly for mysqld.service
Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: Failed to start MySQL Server.
Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: Unit mysqld.service entered failed state.
Apr 23 22:58:56 vmi192102.contabo.host systemd[1]: mysqld.service failed.
[root@vmi192102 ~]#

这是我的.cnf:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#Disablingsymbolic-linksisrecommendedtopreventassortedsecurityrisks
symbolic-links=0
#charsetandcollation
character_set_server=utf8
collation_server=utf8_general_ci

#osrelated
open_files_limit=8192
#shouldbearound3xtable_open_cache,alsosetlimits.conf

#networking
max_connections=100000
max_connect_errors=1000000
max_allowed_packet=128M
connect_timeout=50
wait_timeout=25000
#couldcauseproblemsiftoostrict(default:28800)
net_read_timeout=30
net_write_timeout=60
interactive_timeout=600
slave_net_timeout=60
back_log=50

#finetuning
#key_buffer_size=16M
thread_stack=256K
thread_cache_size=8
sort_buffer_size=1M
read_buffer_size=128k
read_rnd_buffer_size=256k
query_cache_type=0
query_cache_limit=0
query_cache_size=0
table_open_cache=256
tmp_table_size=32M
max_heap_table_size=32M
bulk_insert_buffer_size=16M
auto_increment_increment=1
auto_increment_offset=1
concurrent_insert=2
ft_min_word_len=3

#MyISAMoptions
#myisam_recover_options=FORCE,BACKUP
#myisam_sort_buffer_size=8M

#logging
general_log_file=/var/log/mysql/mysql.log
general_log=0
log_error=/var/log/mysql/error.log
slow_query_log=1
slow_query_log_file=/var/log/mysql/slow.log
long_query_time=2
log_queries_not_using_indexes=1

#replicationsettings
server_id=1
#setto2orhigherinreplicationslaves
log_bin=mysql-bin
#binlog_format=statement
binlog_format=mixed
log_slave_updates=false
expire_logs_days=3
max_binlog_size=1G
binlog_cache_size=32K
sync_binlog=1
#relay_log=mysqld-relay-bin#enableonreplicationslaves
#read_only=true#onlyonreplicationslaves

#InnoDBoptions
innodb_data_home_dir=/var/lib/mysql
innodb_log_group_home_dir=/var/lib/mysql
innodb_table_locks=true
innodb_lock_wait_timeout=50
innodb_thread_concurrency=9
innodb_commit_concurrency=0
innodb_support_xa=true
innodb_buffer_pool_size=2G
innodb_buffer_pool_instances=2
innodb_data_file_path=ibdata1:10M:autoextend
innodb_flush_log_at_trx_commit=1
innodb_flush_method=O_DIRECT
innodb_log_buffer_size=8M
innodb_open_files=8192
innodb_file_per_table

#Settingsuserandgroupareignoredwhensystemdisused.
#Ifyouneedtorunmysqldunderadifferentuserorgroup,
#customizeyoursystemdunitfileformariadbaccordingtothe
#instructionsinhttp://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#pid-file=/var/run/mysqld/mysqld.pid
#
#includeallfilesfromtheconfigdirectory
#
!includedir/etc/my.cnf.d

最佳答案

max_connections=100000

很糟糕。这就是一次连接的次数。100是合理的;一个罕见的系统可能需要1000个。另外,100K会导致巨大的内存分配。
你有多少公羊?

关于mysql - CentOS7:MariaDB更新-无法启动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43576490/

10-13 09:49