Mysql: Can't start server: can't create PID file: No space left on device, mysqlcreate

Source: Internet
Author: User

Mysql: Can't start server: can't create PID file: No space left on device, mysqlcreate

Solution 1:

Today, all the websites on the company's servers have problems. Some of them open without data, and some are directly blank.

My first reaction was that the database crashed. Open remote, enter the system, service mysqld stop failed. Service mysqld start waits for a while, prompting Timeout error occurred trying to start MySQL Daemon

At first, I thought it was a mysql user problem, and there was no problem with the query system users.

Open the log and check that the problem occurs: Can't start server: can't create PID file: No space left on device;

Df-h looked at the disk. The 100% GB hard disk has been used and can be 0;

Deleted the var/log folder. Unexpectedly, the log has accumulated 32 GB.

Crazy sweat !!! Then start mysql.

Solution 2:

Recently, when I was maintaining the linux server, I found that the website could not be opened. After inspection, I found that the mysql database was down, but it could not be started.

Then read the mysql Log File.

Can't start server: can't create PID file: No space left on device appears

This error occurs.

Insufficient disk space

Run the df-h command to view the information.

I found that all the disk capacity was used up, so I had to check who occupied it.
Run the following command:
Find/tmp-size + repeated bytes C
Search for files larger than MB on the disk
It turns out that:

Tomcat's log file occupies 443 GB, which is really bad.
 
Delete this log file
Rm-rf catalina. out
Restart mysql.
It is best to restart linux OS.

Solution 3:

Mysql startup failed. The log is shown as follows:
Copy codeThe Code is as follows:
120321 14:23:54 InnoDB: 1.1.8 started; log sequence number 1595695
120321 14:23:54 [ERROR]/usr/libexec/mysqld: Error writing file '/var/run/mysqld. pid' (Errcode: 28)
120321 14:23:54 [ERROR] Can't start server: can't create PID file: No space left on device
120321 14:23:54 mysqld_safe Number of processes running now: 0
120321 14:23:54 mysqld_safe mysqld restarted
120321 14:23:54 [Note] Plugin 'federated 'is disabled.
120321 14:23:54 InnoDB: The InnoDB memory heap is disabled
120321 14:23:54 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
120321 14:23:54 InnoDB: Compressed tables use zlib 1.2.3
120321 14:23:54 InnoDB: Using Linux native AIO
120321 14:23:54 InnoDB: Initializing buffer pool, size = 128.0 M
120321 14:23:54 InnoDB: Completed initialization of buffer pool
120321 14:23:54 InnoDB: highest supported file format is Barracuda.
120321 14:23:55 InnoDB: Waiting for the background threads to start

 
In fact, the answer is very simple,
No space left on device has No disk space. Clear/var/log space!

Related Article

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.