Two slave servers in mysql are not properly shut down, and the instance cannot be started.

Source: Internet
Author: User


Two slave servers in mysql are not properly shut down, and the instance cannot be started. The problem is solved. For Master/Slave configuration and startup online, you can see the case and explanations in this article, I encountered a few difficult problems here, that is, two slave servers could not be started normally and the instance could not be started because someone did not close the mysql service at night when the server was shut down, when the server is shut down, it cannot be started the next day! The problem is transferred to me. Check the error log carefully and you can see the clues. The following is the error message. www.2cto.com [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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: 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 processInnoDB: using the same InnoDB data or log files.121211 10:03:27 InnoDB: Unable to open the first data fileInnoDB: error in opening. /ibdata20171211 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 atInnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html121211 10:03:27 InnoDB: cocould 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 shocould now edit innodb_data_file_path in my. cnf back121211 10:03:27 InnoDB: to what it was, and remove the new ibdata files InnoDB created121211 10:03:27 InnoDB: in this failed attempt. innoDB only wrote those files full of121211 10:03:27 In NoDB: zeros, but did not yet use them in any way. But be careful: do not121211 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' registry as a storage engine failed.121211 10:03:27 [ERROR] Unknown/unsupported storage engine: innodb121211 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. For pid ended and above problems, you need to remove ibdata and ib_logfile0 and ib_logfile1 files to start InnoDB: Completed initialization of buffer poolInnoDB: The first specified data file at 10:17:37. /ibdata1 did not exist: InnoDB: a new database to be created! 121211 10:17:37 InnoDB: Setting file. /ibdata1 size to 10 MBInnoDB: Database physically writes the file full: wait... 121211 10:17:37 InnoDB: Log file. /ib_logfile0 did not exist: new to be createdInnoDB: Setting log file. /ib_logfile0 size to 5 MBInnoDB: Database physically writes the file full: wait... 121211 10:17:38 InnoDB: Log file. /ib_logfile1 did not exist: new to be createdInnoDB: Setting lo G file. /ib_logfile1 size to 5 MBInnoDB: Database physically writes the file full: wait... innoDB: Doublewrite buffer not found: creating newInnoDB: Doublewrite buffer createdInnoDB: 127 rollback segment (s) active. innoDB: Creating foreign key constraint system tablesInnoDB: Foreign key constraint system tables created121211 10:17:38 InnoDB: Waiting for the background threads to startInnoDB: Unable To lock. /ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.121211 10:17:39 InnoDB: 1.1.7 started; log sequence number 0121211 10:17:39 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use121211 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 processInnoDB: when the using the same InnoDB data or log files is started again, it can be seen that a port occupies 3306 and thus cannot be started. Because this is irrelevant to the test, no port changes are made. Check the following; [root @ CloneSlave01 data] # netstat-tpln | grep 3306tcp 0 0 ::: 3306 ::: * LISTEN 3237/mysqld [root @ CloneSlave01 data] # Kill 3237 [root @ CloneSlave01 data] # netstat-tpln | grep 3306 [root @ CloneSlave01 data] # service mysqld restartMySQL server PID file cocould not be found! [FAILED] Starting MySQL .. [OK] [root @ CloneSlave01 data] # service mysqld restartShutting down MySQL. [OK] Starting MySQL .. [OK] [root @ CloneSlave01 data] # We recommend that you use port 3306 to restart the instance. The operations and steps of the other instance are similar to those described above, I will not post it again. Of course, I will test related data integrity and other issues after it is started! Conclusion: When we shut down the server, we must know which services the server has. We need to close the server in advance to ensure the security and reliability of our data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.