2017-04-23 90 views
0

最新的「百勝更新」我的CentOS勝利後「:T啓動mysqld服務 我已經安裝MariaDB的,做百勝更新現在。‘百勝安裝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 installed Nothing to doCentOS7:MariaDB的更新 - 無法啓動

當試圖做 「服務mysqld的啓動」,出現這種情況:

[[email protected] ~]# 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. 
[[email protected] ~]# 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. 
[[email protected] ~]# 

這是my.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 

回答

0
max_connections=100000 

不好。那是多少個連接一次100是合理的;一個罕見的系統可能需要1000個。另外,100K會導致巨大的內存分配。

你有多少RAM?

+0

我確實有24GB。我意識到這個選項是巨大的,但我使用數據庫爲我自己的目的。從未超過900個左右的連接。 數據庫在「yum update」之前運行得很好 – Matija

+0

我將此選項更改爲1k並嘗試啓動數據庫。還是一樣的錯誤。 – Matija

+0

有沒有'mysqld.err'文件?如果是這樣,它是什麼? –