Today, MySQL has a small problem. Note. The description is as follows:
Start MySQL
./Bin/mysqld_safe -- user = MySQL &
This line appears inexplicably:
Mysqld_safe mysqld from PID file/usr/local/MySQL/data/mark. PID ended
Based on experience, MySQL is definitely not started, and netstat-Na | more does not see 3306
View error logs:
CD/usr/local/MySQL/Data <br/> CAT mark. Err
//////////////////////////////////////// //////////////////////////////////////// ////////////// <Br/> 110510 09:59:40 mysqld_safe mysqld from PID file/usr/local/MySQL/data/mark. PID ended <br/> 110510 10:01:16 mysqld_safe starting mysqld daemon with databases from/usr/local/MySQL/Data <br/> 110510 10:01:16 [note] plugin 'federated 'is disabled. <br/> 110510 10:01:16 InnoDB: the InnoDB memory heap is disabled <br/> 110510 10:01:16 InnoDB: mutexes and rw_locks use InnoDB's own implementation <br/> 110510 10:01:16 InnoDB: compressed tables use zlib 1.2.3 <br/> 110510 10:01:16 InnoDB: Using Linux native AIO <br/> 110510 10:01:16 InnoDB: initializing buffer pool, size = 128.0 m <br/> 110510 10:01:16 InnoDB: Completed initialization of buffer pool <br/> 110510 10:01:16 InnoDB: highest supported file format is barracuda. <br/> 110510 10:01:16 InnoDB: waiting for the background threads to start <br/> 110510 10:01:17 InnoDB: 1.1.6 started; log sequence number 1610190 <br/>/usr/local/MySQL/bin/mysqld: file '. /mysql-bin.000006 'not found (errcode: 13) <br/> 110510 10:01:17 [Error] failed to open log (File '. /mysql-bin.000006 ', errno 13) <br/> 110510 10:01:17 [Error] cocould not open log file <br/> 110510 10:01:17 [Error] Can't init TC log <br/> 110510 10:01:17 [Error] aborting <br/> 110510 10:01:17 InnoDB: starting shutdown... <br/> 110510 10:01:18 InnoDB: shutdown completed; log sequence number 1610190 <br/> 110510 10:01:18 [note]/usr/local/MySQL/bin/mysqld: shutdown complete <br/> ////////////////////////////////// //////////////////////////////////////// ///////////////////////
Solution:
See failed to open log (File './mysql-bin.000006', errno 13) and then,
CD/usr/local/MySQL/Data <br/> RM-F mysql-bin .*
OK!
Start again.
Hey, Mark. PID is displayed under/usr/local/MySQL/data.
This is caused by sudden power failure or forced shutdown. MySQL is not exited normally. Only estimation.
There is also a situation that causes this error:
Modified the/etc/My. CNF file (this file is from the MySQL installation directory ln-S, specific can look at the http://blog.csdn.net/androidbluetooth/article/details/6394301), such as modifying the MySQL Default character set encoding.
If a similar phenomenon occurs, restore the file to the original content, delete the mysql-bin. * file as mentioned earlier, and start MySQL again!