300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > mysql中其中2台从服务器不正常关闭导致 实例启动不起来问题解决【MySQL】

mysql中其中2台从服务器不正常关闭导致 实例启动不起来问题解决【MySQL】

时间:2023-11-19 07:59:04

相关推荐

mysql中其中2台从服务器不正常关闭导致 实例启动不起来问题解决【MySQL】

数据库|mysql教程

服务器,mysql,网上

数据库-mysql教程

php二手交易源码,设置ubuntu的密码,爬虫数据落地分为,php获取php数据,2世seolzw

mysql中其中2台从服务器不正常关闭导致,实例启动不起来问题解决

投融资平台源码,vscode 怎么更新,tsung ubuntu,电脑tomcat报错,sqlite电脑上创建,js手机端视频播放插件,日历前端框架用什么好,爬虫抓取需要http吗,php获取当前的日期,seo项目答辩,社会化网站源码,网页登陆器源码,设计网页模板applzw

对于主从配置和启动网上可以看到大篇的案例和讲解,这里我遇到了几个棘手的问题,就是2台从服务器无法正常启动,实例起不来,原因是有人在晚上做服务器关闭的时候没有先关闭mysql服务,在关闭服务器,到时第二天无法启动!问题转接到我这里看了,仔细看错误日志,变可以看出端倪,以下是错误信息;

php 自助建站源码,ubuntu上没有驱动,tomcat最小化到托盘,爬虫翻页MmEwMD加密,php采集抖音弹幕源码,湛江seo推荐lzw

[root@CloneSlave01 data]# tail -100 CloneSlave01.err

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

121211 10:03:27 InnoDB: Unable to open the first data file

InnoDB: Error in opening ./ibdata1

121211 10:03:27 InnoDB: Operating system error number 11 in a file operation.

InnoDB: Error number 11 means ‘Resource temporarily unavailable’.

InnoDB: Some operating system error numbers are described at

InnoDB: /doc/refman/5.5/en/operating-system-error-codes.html

121211 10:03:27 InnoDB: Could not open or create data files.

121211 10:03:27 InnoDB: If you tried to add new data files, and it failed here,

121211 10:03:27 InnoDB: you should now edit innodb_data_file_path in f back

121211 10:03:27 InnoDB: to what it was, and remove the new ibdata files InnoDB created

121211 10:03:27 InnoDB: in this failed attempt. InnoDB only wrote those files full of

121211 10:03:27 InnoDB: zeros, but did not yet use them in any way. But be careful: do not

121211 10:03:27 InnoDB: remove old data files which contain your precious data!

121211 10:03:27 [ERROR] Plugin ‘InnoDB’ init function returned error.

121211 10:03:27 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.

121211 10:03:27 [ERROR] Unknown/unsupported storage engine: innodb

121211 10:03:27 [ERROR] Aborting

121211 10:03:27 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

121211 10:03:27 mysqld_safe mysqld from pid file /usr/local/mysql/data/CloneSlave01.pid ended

以上的问题,需要剔除ibdata 以及ib_logfile0、ib_logfile1这3个文件便可以正常启动

121211 10:17:37 InnoDB: Completed initialization of buffer pool

InnoDB: The first specified data file ./ibdata1 did not exist:

InnoDB: a new database to be created!

121211 10:17:37 InnoDB: Setting file ./ibdata1 size to 10 MB

InnoDB: Database physically writes the file full: wait…

121211 10:17:37 InnoDB: Log file ./ib_logfile0 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile0 size to 5 MB

InnoDB: Database physically writes the file full: wait…

121211 10:17:38 InnoDB: Log file ./ib_logfile1 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile1 size to 5 MB

InnoDB: Database physically writes the file full: wait…

InnoDB: Doublewrite buffer not found: creating new

InnoDB: Doublewrite buffer created

InnoDB: 127 rollback segment(s) active.

InnoDB: Creating foreign key constraint system tables

InnoDB: Foreign key constraint system tables created

121211 10:17:38 InnoDB: Waiting for the background threads to start

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files.

121211 10:17:39 InnoDB: 1.1.7 started; log sequence number 0

121211 10:17:39 [ERROR] Can’t start server: Bind on TCP/IP port: Address already in use

121211 10:17:39 [ERROR] Do you already have another mysqld server running on port: 3306 ?

121211 10:17:39 [ERROR] Aborting

121211 10:17:39 InnoDB: Starting shutdown…

InnoDB: Unable to lock ./ibdata1, error: 11

InnoDB: Check that you do not already have another mysqld process

InnoDB: using the same InnoDB data or log files

再次启动的时候可以看出有端口占用了3306导致无法启动,由于这是测试无关紧要,就没做端口变更;下面进行查看;

[root@CloneSlave01 data]# netstat -tpln |grep 3306

tcp 00 :::3306:::* LISTEN3237/mysqld

[root@CloneSlave01 data]# kill 3237

[root@CloneSlave01 data]# netstat -tpln |grep 3306

[root@CloneSlave01 data]# service mysqld restart

MySQL server PID file could not be found! [FAILED]

Starting MySQL.. [ OK ]

[root@CloneSlave01 data]# service mysqld restart

Shutting down MySQL. [ OK ]

Starting MySQL.. [ OK ]

[root@CloneSlave01 data]#

我们提出3306的占用端口,即可重新启动,看上面的效果,另一台的操作方法和步骤和以上大同小异,我就不再次贴出来,当然启动好以后还要测试相关的数据完整性等问题!

总结:我们在关闭服务器的时候,一定要了解服务器的有哪些服务,需要我们提前做好关闭的,才能保证我们数据的安全可靠。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。