Cant init tc log Aborting | mysql事务日志导致启动失败问题,killall mysql进程后,mysql无法启动问题总汇; 问题1: 将mysql所有进程kill掉后,重启,无法启动,报错: 110303 14:01:45 InnoDB: Started; log sequence number 0 138710263 /usr/local/mysq
Can”t init tc log Aborting | mysql事务日志导致启动失败问题,,killall mysql进程后,mysql无法启动问题总汇;
问题1:
将mysql所有进程kill掉后,重启,无法启动,报错:
110303 14:01:45 InnoDB: Started; log sequence number 0 138710263
/usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000041′ not found (Errcode: 13)
110303 14:01:45 [ERROR] Failed to open log (file ‘./mysql-bin.000041′, errno 13)
110303 14:01:45 [ERROR] Could not open log file
110303 14:01:45 [ERROR] Can’t init tc log
110303 14:01:45 [ERROR] Aborting
在mysql/data/目录下找到mysql-bin.000041文件,删掉,重启,仍不行,报错:
110303 14:04:07 InnoDB: Started; log sequence number 0 138710263
/usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000041′ not found (Errcode: 2)
110303 14:04:07 [ERROR] Failed to open log (file ‘./mysql-bin.000041′, errno 2)
110303 14:04:07 [ERROR] Could not open log file
110303 14:04:07 [ERROR] Can’t init tc log
110303 14:04:07 [ERROR] Aborting
touch之,修改权限,重启,也不行,报错():
110303 14:05:41 InnoDB: Started; log sequence number 0 138710263
110303 14:05:41 [ERROR] I/O error reading the header from the binary log, errno=-1, io cache code=0
110303 14:05:41 [ERROR] I/O error reading the header from the binary log
110303 14:05:41 [ERROR] Can’t init tc log
110303 14:05:41 [ERROR] Aborting
最后解决办法:
将mysql/data/mysql-bin.index文件删除,重启mysql,会自动生成新的mysql-bin.index文件,启动成功
问题2:
启动后,报错:
InnoDB: Started; log sequence number 0 1004308157
110303 14:15:01 [Note] Recovering after a crash using mysql-bin
110303 14:15:01 [ERROR] Error in Log_event::read_log_event(): ‘read error’, data_len: 169, event_type: 2
110303 14:15:01 [Note] Starting crash recovery…
110303 14:15:01 [Note] Crash recovery finished.
/opt/31306/mysql/bin/mysqld: Disk is full writing ‘./mysql-bin.~rec~’ (Errcode: 28). Waiting for someone to free space… (Expect up to 60 secs delay for server to continue after freeing disk space)
这是由于mysql-bin日志过多,进入mysql/data/目录,果断删除所有mysql-bin.*文件,重启,启动成功
问题3:
启动后,报错:
110303 14:21:37 InnoDB: Started; log sequence number 0 487312871
110303 14:21:37 [ERROR] Can’t start server: Bind on TCP/IP port: Address already in use
110303 14:21:37 [ERROR] Do you already have another mysqld server running on port: 43306 ?
110303 14:21:37 [ERROR] Aborting
按提示,应该是43306端口占用,但是查看后并未发现该端口被占用,不深究,果断将其my.cnf文件中的port修改成一个新的端口,重启,启动成功。关闭后,重新将my.cnf中的port改回为43306,重启,又可以成功启动了。

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

MySQloffersechar, Varchar, text, Anddenumforstringdata.usecharforfixed-Lengthstrings, VarcharerForvariable-Length, text forlarger text, AndenumforenforcingdataAntegritywithaetofvalues.

Optimizing MySQLBLOB requests can be done through the following strategies: 1. Reduce the frequency of BLOB query, use independent requests or delay loading; 2. Select the appropriate BLOB type (such as TINYBLOB); 3. Separate the BLOB data into separate tables; 4. Compress the BLOB data at the application layer; 5. Index the BLOB metadata. These methods can effectively improve performance by combining monitoring, caching and data sharding in actual applications.

Mastering the method of adding MySQL users is crucial for database administrators and developers because it ensures the security and access control of the database. 1) Create a new user using the CREATEUSER command, 2) Assign permissions through the GRANT command, 3) Use FLUSHPRIVILEGES to ensure permissions take effect, 4) Regularly audit and clean user accounts to maintain performance and security.

ChooseCHARforfixed-lengthdata,VARCHARforvariable-lengthdata,andTEXTforlargetextfields.1)CHARisefficientforconsistent-lengthdatalikecodes.2)VARCHARsuitsvariable-lengthdatalikenames,balancingflexibilityandperformance.3)TEXTisidealforlargetextslikeartic

Best practices for handling string data types and indexes in MySQL include: 1) Selecting the appropriate string type, such as CHAR for fixed length, VARCHAR for variable length, and TEXT for large text; 2) Be cautious in indexing, avoid over-indexing, and create indexes for common queries; 3) Use prefix indexes and full-text indexes to optimize long string searches; 4) Regularly monitor and optimize indexes to keep indexes small and efficient. Through these methods, we can balance read and write performance and improve database efficiency.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)
