Well, It seems I've had such an overwhelming response! :-?
Did I not post in the right forum?
After downloading and viewing the mysql logs, 99.9% of them are sessions, so I've had to go through a lot of logs to retrieve the posts.
Does anybody know how to ONLY disable the database from logging sessions, while continuing to log the posts?
In my first post, I answered most of my questions... And I'll post what I found incase anybody else comes along searching the forums with the same questions.
Quote:
|
Originally Posted by Myself
Now, I've never seen these files before, are they backups?
|
Yes and no. No, they are not backups, and yes, they can be used to restore your database. They are log files so they continually log everything that's going on in the databases.
Quote:
|
Originally Posted by Myself
Now if they are backups, what is the best way to import them into phpmyadmin?
|
After searching google, I did find ways to import them into mysql.
But since I did not do this right away, I would be destroying my new information by importing the old info on top of it. So this was/is not a viable option.
Quote:
|
Originally Posted by Myself
I'm not to privy to downloading 3 GB worth of 100+MB files to my hard drive just to upload them again.
|
Simple solution: copy them to another directory Gzip them then download them using FTP, wget, or curl.
e.g.: The mysql-bin logs are (usually) contained in the server log directory (/var/log/mysql/) I copied them to a location where I could download them using an FTP application, in this case, one of my sites. So I used this code in shell:
Code:
cp /var/log/mysql/mysql-bin.123456 /var/www/sites/mywebsite.com/public_html/log/mysql-bin.123456
Then I switched to that directory on my site and gzipped the log file, which was 100MB, compressed, it becomes about 6 or 7MB, a pretty quick download, then the last code removes the 100MB log file, while leaving the GZIP to be downloaded:
Code:
cd /var/www/sites/mywebsite.com/public_html/log && gzip -c mysql-bin.123456 > mysql-bin.123456.gz && rm mysql-bin.123456
All that's left to do is download your gzipped file using FTP, wget or curl.
Now, since the file is too big to be viewed by a text editor, I used the split command to make them more viewable:
Code:
split -b 1m mysql-bin.123456 segment
This will tell it to split up the file "mysql-bin.123456" into segments of 1MB files apiece with the prefix of "segment", so they will come out as:
segmentaa
segmentab
segmentac etc...
Who knows, perhaps that will help somebody down the road.