重启和其他一些速度下降问题后,我看到此错误。 MYSQL一直在重新启动,我认为这意味着InnoDB正在恢复,尽管我对该过程还不十分了解。我正在运行CentOS 6并看到以下内容:
InnoDB: Apply batch completed
InnoDB: In a MySQL replication slave the last master binlog file
InnoDB: position 0 256214410, file name mysqld-bin.000003
InnoDB: Last MySQL binlog file position 0 390069474, file name /var/lib/mysql/.000105
190105 17:11:09 InnoDB: Started; log sequence number 91 3960852448
InnoDB: Starting in background the rollback of uncommitted transactions
190105 17:11:09 InnoDB: Rolling back trx with id 0 3103647860, 655 rows to undo
190105 17:11:09 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './empire/member_list.frm'
190105 17:11:09 [ERROR] /usr/libexec/mysqld: Incorrect information in file: './empire/member_list.frm'
190105 17:11:09 [Note] Recovering after a crash using /var/lib/mysql/
190105 17:11:09 [Note] Starting crash recovery...
190105 17:11:09 [Note] Crash recovery finished.
190105 17:11:09 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
190105 17:11:09 [ERROR] Do you already have another mysqld server running on port: 3306 ?
190105 17:11:09 [ERROR] Aborting
190105 17:11:09 InnoDB: Starting shutdown...
190105 17:11:09 [ERROR] /usr/libexec/mysqld: Incorrect information in file:
my.cnf文件的外观如下:
The MySQL server
[mysqld]
innodb_file_per_table = 1
log-bin=/var/lib/mysql/
#binlog-do-db=leadtraffic
#binlog-do-db=fullemedia
binlog-ignore-db=supp
server-id=5
#master-host=XXX
#master-user=XXX
#master-password=XXX
#master-connect-retry=60
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-name-resolve
relay-log=/data1/mysqld/mysqld-relay-bin
skip-slave
#set-variable = join_buffer_size=60M
set-variable = key_buffer=128M
set-variable = max_allowed_packet=30M
set-variable = table_cache=64
set-variable = sort_buffer=8M
set-variable = record_buffer=2M
set-variable = myisam_sort_buffer_size=8M
set-variable = thread_cache=4
set-variable = thread_concurrency=2
set-variable = max_connections=500
set-variable = wait_timeout=3600
#
#replicate-ignore-table=dreamdirect.member_list_old
#replicate-ignore-table=dreamdirect.realtime_info
#replicate-ignore-table=dreamdirect.realtime_info1
#replicate-ignore-table=dreamdirect.realtime_info2
#replicate-ignore-table=dreamdirect.camp_realtime_info
#replicate-ignore-table=fullemedia.realtime_info
#replicate-ignore-table=fullemedia.realtime_info1
#replicate-ignore-table=fullemedia.realtime_info2
#replicate-ignore-table=test.*
#replicate-ignore-table=test.md5supp
# Uncomment the following if you are using BDB tables
#set-variable = bdb_cache_size=64M
# Point the following paths to different dedicated disks
tmpdir = /var/tmp/
#log-update = /path-to-dedicated-directory/hostname
innodb_data_home_dir=
innodb_data_file_path = /data1/ibdata/ibdata1:5000M;/data1/ibdata/ibdata2:5000M;/data1/ibdata/ibdata3:5000M;/data1/ibdata/ibdata4:5000M:autoextend
set-variable = innodb_buffer_pool_size=1G
set-variable = innodb_additional_mem_pool_size=5M
innodb_log_group_home_dir= /data1/iblogs
innodb_log_arch_dir = /data1/iblogs
set-variable = innodb_log_files_in_group=3
##
set-variable = innodb_log_file_size=100M
set-variable = innodb_log_buffer_size=16M
set-variable = innodb_file_io_threads=8
set-variable = innodb_lock_wait_timeout=100
set-variable = innodb_autoextend_increment=200
#
innodb_flush_log_at_trx_commit=0
innodb_log_archive=0
set-variable = innodb_lock_wait_timeout=100
#innodb_flush_method = O_DSYNC
[mysqldump]
quick
set-variable = max_allowed_packet=16M
[mysql]
no-auto-rehash
#safe-updates # Remove the comment character if you are not familiar with SQL
[isamchk]
set-variable = key_buffer=2M
set-variable = sort_buffer=1M
set-variable = read_buffer=1M
set-variable = write_buffer=1M
[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M
这是否可能是缓冲区问题,它会不断从数据文件中移至旧数据?那是新手的猜测。
答案 0 :(得分:0)
这是最相关的线索:
190105 17:11:09 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
190105 17:11:09 [ERROR] Do you already have another mysqld server running on port: 3306 ?
190105 17:11:09 [ERROR] Aborting
这是在告诉您另一个守护进程已经在使用端口3306。一次只能有一个进程在给定的端口上侦听,因此当您尝试启动mysqld时,它无法绑定到该端口,并关闭
很可能是另一个已经运行的mysqld实例。您可以使用ps -elw | grep mysqld
进行确认。
在以您尝试的方式启动mysql服务器之前,您需要确保关闭任何其他实例。如果所有其他方法均失败,则可能必须使用kill -9
来执行此操作,并确保也关闭启动器mysqld_safe
(如果正在运行启动器),否则它将仅重新启动mysqld过程。
您看到的另一个有关“文件中信息不正确”的错误表明您的一个表定义已损坏-empire.member_list
的表定义已损坏。这还不足以阻止mysqld的启动,但是您将无法使用该表。
如果您的表使用MyISAM,ARCHIVE或CSV引擎,则可以尝试REPAIR TABLE(请阅读文档,这里我不想输入已经存在的文档)。
如果您的表是InnoDB,或者由于某种原因修复不起作用,请从最近的备份中还原表。
如果没有备份,请将其视为学习经验。您应该养成进行备份的习惯。