Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi there, we are running a server based on centOS with mariadb.
Now folder /var/lib/mysql where MySQL are stored is getting full, because one file/folder is getting bigger and bigger. I don't know whats the purpose of this file/folder.
Do you have any experience to share with me or ideas, how I can delete this file/folder? Should I delete this or its essential?
I deleted those files/folders
What I don't get with your sources: Why was there this huge folders? What are this?
They were databases. How they got there is anybody's guess.
Grok around /var/log/, check .mysql_history files on the system.
If that's the way you verify databases, I hope you have tested backups.
And why ask why, if you don't care to follow direction?
I hope that you are using LVM = Logical Volume Management to manage your physical drive space. If so, you can simply add another hard drive to your physical storage pool, then assign all or part of it to the logical storage pool where your "mysql" folder is located. Even without restarting your machine, you have just increased the amount of space available.
And if you don't use LVM now, I strongly suggest that you convert to it at once.
I had a similar issue and I investigated thoroughly.
My monitoring toolkit told me to inspect that virtual machine for high disk usage, when I wasn't expecting it... After searching through the file system, I noticed a file named /var/lib/mysql/1 having a size of about 40 GB...
After some checkups, I noticed the file was opened by the main MySQL thread, so I suspected it was maybe a log... I checked some parts of the file and this confirmed my intuition...
After some investigation, I noticed there was an entry "log_slow_queries=1" into the MySQL configuration... I tested changing the parameter to the value "0" and it created a log with that name in the /var/lib/mysql folder...
According to the documentation, the log_slow_queries parameter isn't a boolean... If it is defined, it uses the name as is... If it's a 0 or a 1, it will create the log with that name.
So I expect you have an entry "log_slow_queries=0" in your MySQL configuration.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.