LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-08-2014, 10:11 AM   #16
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46

Here's the show slave status from the server from the original post

Slave_IO_State: Waiting for master to send event

Then further down it has
Last_Error: Error 'Table 'Testingdb.objectcache' doesn't exist' on query
 
Old 05-08-2014, 10:13 AM   #17
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
I think I'm going to try turning off this server, see if anything breaks. I have one final question though. You said "the master will continue to log replication regardless". But what happens if none of the slaves are running to read that logged info, will those files just build up on the master, or is there some sort of auto purge setup (or that you can setup) on those files that I should check to avoid my server running out of space?
 
Old 05-08-2014, 10:14 AM   #18
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,166

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
Quote:
Originally Posted by rjo98 View Post
Here's the show slave status from the server from the original post

Slave_IO_State: Waiting for master to send event

Then further down it has
Last_Error: Error 'Table 'Testingdb.objectcache' doesn't exist' on query
Looks like replication was set up but broke at some point.
 
Old 05-08-2014, 10:17 AM   #19
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,166

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
Quote:
Originally Posted by rjo98 View Post
You said "the master will continue to log replication regardless". But what happens if none of the slaves are running to read that logged info, will those files just build up on the master, or is there some sort of auto purge setup (or that you can setup) on those files that I should check to avoid my server running out of space?
The server will indeed keep building those files up, they aren't flushed when the slaves read them either, they keep building up and building up.


Somewhere in your my.cnf there will be a expire_logs_days= directive. This specifies how long your master will keep the replication information for. https://dev.mysql.com/doc/refman/5.0...pire_logs_days
 
Old 05-08-2014, 10:31 AM   #20
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Yeah, and seems like it was for a non-important db also just based on the name, definitely not one of the db's that worries me.

I don't see that parameter in my my.cnf though
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql

# replication
log-bin=mysql-bin
server-id=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

When I look in /var/lib/mysql though, I only see 20some mysql-bin.###### files, and they're all at least 1MB, of which 9 are from this year. Should I even worry about it?
 
Old 05-08-2014, 10:32 AM   #21
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,166

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
From the information provided it really does look like it's unused.
 
Old 05-08-2014, 10:35 AM   #22
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Yeah, this server does host a database we do use, but only like once a month really, so maybe that explains the small number of those files. and since they're so small, maybe i'm worrying over nothing.

I have the server from my original post turned off since it doesn't seem like much was going on there anyway, and this "real" server doesn't seem like it'll fill up with those replication files anytime soon, so unless someone screams that something isn't working, I think I'm in good shape. would you agree?
 
Old 05-08-2014, 10:38 AM   #23
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,166

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
The whole "turn it off and see who yells" approach to obsolete server hunting Hope it works out for you.

Personally I'd be tempted to take an image (clonezilla!!!!!!) of the slave for safety.
 
Old 05-08-2014, 10:41 AM   #24
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Oh yeah, gotta love that old trick haha I hope it works out too :-)

I just shutdown -h the slave/server I hope we don't need anymore. Luckily I know it starts up fine, so I'm just going to let it sit there for a long time before we actually get rid of it. call me paranoid.

I never used clonezilla before. Would that let me image it and load it up on my laptop in VirtualBox or something like that?
 
Old 05-08-2014, 10:44 AM   #25
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,166

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
clonezilla will create a set of files that are exact images of the disk partitions. In the past I've created a Citrix XenServer virtual machine from clonezilla images, I'm sure using VirtualBox is an option too.
 
Old 05-08-2014, 10:46 AM   #26
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
ok, I might have to check that out. it'd be pretty cool if I could run the server from my machine if I needed to. I did make a tgz of the /var/lib/MySQL directory before I turned it off. not sure why, but sounded like a good idea.
 
Old 05-08-2014, 01:26 PM   #27
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,599

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Have you looked at the server logs? They seem to record when there has been a connection to the database, as well as replication logs, and it even appears to have statement logs of user activity.

https://dev.mysql.com/doc/refman/4.1...rver-logs.html
 
Old 05-08-2014, 01:39 PM   #28
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
I look in /var/log at some stuff, but i think the last time anything was actually used on this was way past what's in there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Databases/ MySQL... spoovy General 9 04-26-2010 01:43 AM
LXer: How To Back Up MySQL Databases Without Interrupting MySQL LXer Syndicated Linux News 0 05-14-2007 10:16 AM
List databases in MySQL vital_101 Linux - Server 2 11-08-2006 07:26 PM
restoring mysql databases? and mysql permissions... armegeden Linux - Software 0 03-13-2003 12:04 PM
mysql databases k3v0 Linux - Software 2 12-03-2002 08:41 PM


All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration