mysql5.5 启动报错:ERROR!美高梅娱乐场网站

发布时间:2019-12-12  栏目:计算机教程  评论:0 Comments

 

升级my.cnf注意

在FreeBSD中启动mysql时报错,ERROR! The server quit without updating PID
file,通常这是可以查看数据库目录下的.err日志,里面会记录一些具体的错误信息,对排错相当有用,内容如下:

mkdir -p /ngbs/data/{logs,tmp}

110805 17:30:19 mysqld_safe Starting mysqld daemon with databases from
/usr/local/mysql5.5/data

vi  /etc/init.d/mysql
basedir=/usr/local/mysql
datadir=/ngbs/data/

110805 17:30:19 InnoDB: The InnoDB memory heap is disabled

cp ib_logfile* logs/

110805 17:30:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins

chown -R  mysql:mysql  /ngbs/data

110805 17:30:19 InnoDB: Compressed tables use zlib 1.2.3

要注意ibdata1大小要跟实际大小一样
不然报错
2017-04-14 18:14:13 16812 [ERROR] InnoDB: auto-extending data file
/ngbs/data/ibdata1 is of a different size 25344 pages (rounded down to
MB) than specified in the .cnf file: initial 64000 pages, max 0
(relevant if non-zero) pages!
2017-04-14 18:14:13 16812 [ERROR] InnoDB: Could not open or create the
system tablespace. If you tried to add new data files to the system
tablespace, and it failed here, you should now edit
innodb_data_file_path in my.cnf back to what it was, and remove the
new ibdata files InnoDB created in this failed attempt. InnoDB only
wrote those files full of zeros, but did not yet use them in any way.
But be careful: do not remove old data files which contain your precious
data!
2017-04-14 18:14:13 16812 [ERROR] Plugin ‘InnoDB’ init function
returned error.
2017-04-14 18:14:13 16812 [ERROR] Plugin ‘InnoDB’ registration as a
STORAGE ENGINE failed.
2017-04-14 18:14:13 16812 [ERROR] /usr/local/mysql/bin/mysqld: unknown
variable ‘binlog_gtid_simple_recovery=1’
2017-04-14 18:14:13 16812 [ERROR] Aborting

110805 17:30:19 InnoDB: Initializing buffer pool, size = 256.0M


110805 17:30:19 InnoDB: Completed initialization of buffer pool

[client]
port            = 3306
socket            = /ngbs/data/tmp/mysql.sock   
 

InnoDB: Error: log file /usr/local/mysql5.5/data/ib_logfile0 is of
different size 0 5242880 bytes

# The MySQL server
[mysqld]
#########Basic##################
explicit_defaults_for_timestamp=true

InnoDB: than specified in the .cnf file 0 67108864 bytes!

port            = 3306  
user            = mysql   
basedir         = /usr/local/mysql  
datadir         = /ngbs/data/   
tmpdir          = /ngbs/data/tmp/   
pid-file        = /ngbs/data/tmp/mysql.pid    
socket            = /ngbs/data/tmp/mysql.sock   
#美高梅娱乐场网站,skip-grant-tables  

110805 17:30:19 [ERROR] Plugin ‘InnoDB’ init function returned error.

#character set
character_set_server = utf8

110805 17:30:19 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE
ENGINE failed.

open_files_limit = 65535
back_log = 500
#event_scheduler = ON
#lower_case_table_names=1
skip-external-locking
skip_name_resolve = 1
default-storage-engine = InnoDB

110805 17:30:19 [ERROR] Unknown/unsupported storage engine: InnoDB

#timeout
wait_timeout=100
interactive_timeout=100

110805 17:30:19 [ERROR] Aborting

server-id       =213306  

 

#percona 的–recursion-method slavehost模式
#report_host = 10.105.9.115
#report_port = 3306

110805 17:30:19 [Note] /usr/local/mysql5.5/bin/mysqld: Shutdown
complete

#plugin
plugin-load=”semisync_master.so;semisync_slave.so”

看到上面红色字体,显示错误是出在日志文件大小上,于是查看mysql的配置文件/etc/my.cnf

#########error log#############
log-error = /ngbs/data/logs/error.log  
log-warnings = 2  

# Uncomment the following if you are using InnoDB tables

#########general log#############
#general_log=1
#general_log_file=/ngbs/data/logs/mysql.log

innodb_data_home_dir = /usr/local/mysql5.5/data

#########slow log#############
slow_query_log = 1
long_query_time=1
slow_query_log_file = /ngbs/data/logs/mysql.slow   

innodb_data_file_path = ibdata1:10M:autoextend

############# for
replication###################

innodb_log_group_home_dir = /usr/local/mysql5.5/data

log-bin     = /ngbs/data/logs/mysql-bin   
binlog_format = row
max_binlog_size = 500M
binlog_cache_size = 2M
max_binlog_cache_size = 2M
expire-logs-days = 7
slave-net-timeout=30

留下评论

网站地图xml地图